Gate CS-2008 Question Paper With Solutions

Q. 75 Choose the correct option to fill ?1 and ?2 so that the program below prints aninput string in reverse order. Assume that the input string is terminated by a
newline character.

void reverse(void) 
{ 
    int c;
    if(?1) reverse();
    ?2 
} 
main() 
{ 
    printf("Enter text"); 
    printf("\n"); 
    reverse(); 
    printf("\n"); 
}

Gate CS-2008 Question Paper With Solutions

Answer: (D)

Explanation:

Gate CS-2008 Question Paper With Solutions

Learn More:   Gate ME 2015-3 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here