aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • C Programs (GATE)
  • Find the output of the following C program: main(){extern...
Multiple choice

Find the output of the following C program:

main(){extern int i;i=20;printf(%d,sizeof(i));}

  1. 2

  2. 4

  3. Would vary from compiler to compiler

  4. Error

  5. None of these

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

There will be linker error also.

Keep practicing — related questions

  • Find the output of the following C program: main(){extern int a;printf(%d, a);}int a =20;
  • Find the output of the following C program: main(){int i=2;printf(%d %d,++i,++i);}
  • Find the output of this program. main() { int i=5; printf(“%d”,i=++i ==6); }
  • Find the output of this program. main() { int i=5; printf(“%d”,i=++i ==6); }
  • What will be the output of the following program : void main() { printf("%d",sizeof(integer)); }
  • What will be the output of the following question? main() { extern int out; printf(“%d”,out); } int out=100;
  • Find the output of this program. main() { int a[10]; printf("%d",*a+1-*a+3) ; }
  • Find the output of this program. main() { int a[10]; printf("%d",*a+1-*a+3) ; }
Play the full quiz 🎤 Practise this topic out loud

Practice this topic

  • Programming Output Evaluation (1721 questions)
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy