C - Storage Classes of Variables Questions and Answers

Take Exam

C Storage Classes of Variables MCQ questions with answers focus on auto, static, extern, and register storage classes. Understanding these concepts is essential for mastering memory management and variable scope in C programming. These programming questions and answers are frequently asked in interviews and placement exams conducted by Wipro, TCS, and Infosys. Practicing MCQs on C storage classes helps improve your grasp of variable lifetime, linkage, and accessibility. Download the C programming MCQ PDF and attempt online practice tests to build a strong foundation in variable management.

C - Storage Classes of Variables

Showing 10 of 33 questions

31. What does extern means in a function declaration ?

  • The function has global scope.
  • The function need not be defined
  • Nothing really
  • The function has local scope only to the file it is defined in.
Show Answer Report

32. extern int s; int t; static int u; main ( ) { } which of s, t and u are available to a function present in another file ?

  • only s
  • s & u
  • s, t, u
  • none
Show Answer Report

33. What will be the output of  the following code ? static int i = ; main ( ) { int sum=; do { sum+=(/i); }while (<i - - ); printf ("sum of the series is %d", sum ); }

  • It will print the sum of the series 1/5+1/4+.....+1/1.
  • It will produce a compilation error
  • It will produce a runtime error.
  • None of the above.
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test