Storage Class Questions and Answers
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
32. Which of the following storage class creates a block scoping ?
- Auto
- Register
- Static
- Extern
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
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
35. Which of the following is not decided by storage class ?
- Storage
- Life
- Address
- Scope
36. The storage class which has no storage, life, initial value, scope and linkage is
- Auto
- Register
- Extern
- Typedef
37. The storage class which creates new name of the data type
- Auto
- Register
- Extern
- Typedef
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
39. Find the output int a=20; void main () { int a=5; { int a=10; } printf("5d", a); }
- 20
- 5
- 10
- None of these
40. Which of the storage class allocates memory in run time ?
- Auto
- Register
- Static
- Extern