Storage Class Questions and Answers

Take Exam

Storage Class Questions with Answers are a core part of C programming aptitude and interview tests. These programming questions and answers cover storage types like auto, static, register, and extern, which define variable scope and lifetime. Frequently asked in Wipro, Tech Mahindra, and TCS exams, storage class MCQs evaluate your understanding of memory management and code optimization. Solving these C programming MCQs with detailed explanations will enhance your technical readiness. You can practice online or download free PDFs of storage class questions for quick revision.

Storage Class

Showing 10 of 97 questions

31. Find the output main ( ) { show ( ); show ( ); } int show ( ) { static int a=5; a++; printf("5d", a); }

  • 5 5
  • 6 6
  • 5 6
  • 6 7
Show Answer Report

32. Which of the following storage class creates a block scoping ?

  • Auto
  • Register
  • Static
  • Extern
Show Answer Report

33. Find the output. void main ( ) { int x; #include<stdio.h> x=printf("clrscr ( )"); printf('5d", x); }

  • c1rscr()8
  • c1rscr()
  • Run time error
  • Compile time error
Show Answer Report

34. Writing static to a global variable means

  • The variable is only visible to that file
  • The variable is only visible to other file
  • The variable is only visible to all file
  • None of these
Show Answer Report

35. Which of the following is not decided by storage class ?

  • Storage
  • Life
  • Address
  • Scope
Show Answer Report

36. The storage class which has no storage, life, initial value, scope and linkage is

  • Auto
  • Register
  • Extern
  • Typedef
Show Answer Report

37. The storage class which creates new name of the data type

  • Auto
  • Register
  • Extern
  • Typedef
Show Answer Report

38. Find the output main ( ) { show ( ); show ( ); } int show ( ) { extern int a; a++; printf('%d", a); } int a=5; }

  • 5 5
  • 6 6
  • 5 6
  • 6 7
Show Answer Report

39. Find the output int a=20; void main () { int a=5; { int a=10; } printf("5d", a); }

  • 20
  • 5
  • 10
  • None of these
Show Answer Report

40. Which of the storage class allocates memory in run time ?

  • Auto
  • Register
  • Static
  • Extern
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test