Question: Need help knowing exactly what values the for loops and if/else statements are checking against...if you can clearly explain the steps the code is taking

Need help knowing exactly what values the for loops and if/else statements are checking against...if you can clearly explain the steps the code is taking it would be very appreciated...

void part5(char buffer[], const int bufferSize){ const char allowed[] = "a3hUD6Cc8bTzv"; int i, j, x;

for(i=0; i

x = getchar(); if(x == EOF) explode(10); else if(x == ' ') explode(11);

c = (char)x; for(j=2; j<10; ++j){ if(c == allowed[j]){ buffer[i] = c + 1; break; } } if(j == 10){ explode(12); }

}

j = 0; for(i=1; i

/* Windows encodes an end-of-line as two characters: */ /* Linux just uses */ /* This will accept either version */ x = getchar(); if(x == ' ') x = getchar(); if(x != ' ') explode(14); }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!