GATEverse Practice, past papers & mock tests
GATE 2026 · CS2 - Afternoon
Programming & Data StructuresProgrammingmediumMCQ1 mark
Consider the following three ANSI-C programs, P1, P2, and P3. P1:
c
#include <stdio.h>
int a=5;
int main(){
  int a=7;
  return(0);
}

P2:
#include <stdio.h>
int main(){
  int a=5;
  int a=7;
  return(0);
}

P3:
#include <stdio.h>
int main(){
  int a=5;
  float a=7;
  return(0);
}
Which one of the following statements is true?
Save your progress

Related Programming & Data Structures PYQs