GATE 2008 CS – Question 61
Fill ?1, ?2 to print a newline-terminated input string in reverse order.
void reverse(void) {
int c;
if (?1) reverse();
?2
}
main() {
printf("Enter Text"); printf("\n");
reverse(); printf("\n");
}Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (D) ?1: (c = getchar()) != '\n'; ?2: putchar(c);
Explanation
We are sorry we couldn't write detailed soluition for this, we are working on it!, please consider asking your own AI, its just 2-3 clicks with very minimum effort