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

1. The area or scope of the variable depends on its

  • Data type
  • Storage class
  • System type
  • None of these
Show Answer Report

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
Show Answer Report

3. Which variables can not be directly accessed by other functions ?

  • Auto
  • Static
  • Register
  • Extern
Show Answer Report

4. if float and double are defined wity type register the compiler treats them as

  • Auto variables
  • Static variables
  • Register variables
  • Extern variables
Show Answer Report

5. Find the odd one

  • Block scope
  • File scope
  • Local scope
  • Program scope
Show Answer Report

6. Which storage class manages memory efficientlly?

  • Static
  • Auto
  • Extern
  • Register
Show Answer Report

7. Which variable has no memory address ?

  • Auto
  • Register
  • Extern
  • Static
Show Answer Report

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
Show Answer Report

9. Which storage class variables are created in stack?

  • Auto
  • Auto, static
  • Register, static
  • Extern, static
Show Answer Report

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
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test