Explain Working Logic Code Written C Language Q37165167

void reverse string(void) char ch; scanf (%c, &ch ); 007 if(ch! In) printf(%c, ch); 07 reverse string);

Explain the working logic of this code written in Clanguage.

void reverse string(void) char ch; scanf (“%c”, &ch ); 007 if(ch! In’) printf(“%c”, ch); 07 reverse string); Show transcribed image text void reverse string(void) char ch; scanf (“%c”, &ch ); 007 if(ch! In’) printf(“%c”, ch); 07 reverse string);


Answer


It reads one character from user and prints the character if it is not a new line character.and calls the function again to do the same task recursively.It won’t stop

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.