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
1. The area or scope of the variable depends on its
- Data type
- Storage class
- System type
- None of these
2. The storage class of a variable tells the compiler
- The storage area of the variable
- the default initial value of a variable
- Life of the variable
- All the above
3. Which variables can not be directly accessed by other functions ?
- Auto
- Static
- Register
- Extern
4. if float and double are defined wity type register the compiler treats them as
- Auto variables
- Static variables
- Register variables
- Extern variables
8. Find the output. void main ( ) { int static auto x; x=5; printf("5d", ++x); x--; printf ("%d", x); }
- Error: too many storage classes in declaration
- 6 5
- 6 6
- None of these
9. Which storage class variables are created in stack?
- Auto
- Auto, static
- Register, static
- Extern, static
10. Whch of the following are created during execution time?
- Auto & static variables
- Register and static variables
- All variables are created during compile time
- Auto and register variables