C - Storage Classes of Variables Questions and Answers

Practice Mode
Showing 10 of 33 questions
Q31
What does extern means in a function declaration ?
  • A The function has global scope.
  • B The function need not be defined
  • C Nothing really
  • D The function has local scope only to the file it is defined in.
Answer: Option C
Q32
extern int s; int t; static int u; main ( ) { } which of s, t and u are available to a function present in another file ?
  • A only s
  • B s & u
  • C s, t, u
  • D none
Answer: Option A
Q33
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 ); }
  • A It will print the sum of the series 1/5+1/4+.....+1/1.
  • B It will produce a compilation error
  • C It will produce a runtime error.
  • D None of the above.
Answer: Option C
Questions and Answers for Competitive Exams Various Entrance Test