C - Storage Classes of Variables Questions and Answers

Take Exam

C Storage Classes of Variables MCQ questions with answers focus on auto, static, extern, and register storage classes. Understanding these concepts is essential for mastering memory management and variable scope in C programming. These programming questions and answers are frequently asked in interviews and placement exams conducted by Wipro, TCS, and Infosys. Practicing MCQs on C storage classes helps improve your grasp of variable lifetime, linkage, and accessibility. Download the C programming MCQ PDF and attempt online practice tests to build a strong foundation in variable management.

C - Storage Classes of Variables

Showing 10 of 33 questions

1. Storage class controls

  • lifetime of a variable
  • scope of a variable
  • linkage of a variable
  • all the above
Show Answer Report

2. Longevity of a variable refers to

  • the duration for which the variable retains a given value during the execution of a program
  • the portion of a program in which the variable may be visible.
  • internal linkage of a variable
  • external linkage of a variable.
Show Answer Report

3. scope of a variabe the refers to

  • the duration for which the variable retains a given value during the execution of a program
  • the portion of a program in which the variable may be visible.
  • the value of the variable
  • linkage of a variable.
Show Answer Report

4. A variable with external linkage refers to

  • the duration for which the variable retains a given value during the execution of a program
  • the same value for every occurence of that variable in a particular file.
  • the same value in every source file where source program spans over multiple files.
  • block scope.
Show Answer Report

5. A variable with internal linkage erfers to

  • the duration for which the variable retains a given value during the execution of a program.
  • the same value for every occurence of that variable in a particular file.
  • the same value in every source file where source program spans over multiple files
  • block scope.
Show Answer Report

6. A variable with no linkage refers to

  • the duration for which the variable retains a given value during the execution of a program.
  • the same value for every occurence of that variable in a particular file.
  • the same value in every source file where source program spans over multiple files.
  • block scope.
Show Answer Report

7. Which is not a storage class ?

  • auto
  • struct
  • typedef
  • static
Show Answer Report

8. The automatic storage class has

  • temporary storage
  • block scope
  • persistent storage
  • options a and b
Show Answer Report

9. The regiester storage class has

  • temporary storage
  • block scope
  • persistent storage
  • options a and b
Show Answer Report

10. The storage class type of internal static has

  • persistent storage
  • block scope
  • file scope
  • options a and b
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test