GATEverse Practice, past papers & mock tests
GATE 2024 · CS1 - Forenoon
Programming & Data StructuresProgrammingmediumMCQ1 mark
Consider the following C program:
c
#include <stdio.h>
void fX();
int main(){
  fX();
  return 0;}
void fX(){
  char a;
  if((a=getchar()) ≠ '\n')
    fX();
  if(a ≠ '\n')
    putchar(a);}
Assume that the input to the program from the command line is 1234 followed by a newline character. Which one of the following statements is CORRECT?
Save your progress

Related Programming & Data Structures PYQs