C - Storage Classes of Variables Questions and Answers
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
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.
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.
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.
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.
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.
8. The automatic storage class has
- temporary storage
- block scope
- persistent storage
- options a and b
9. The regiester storage class has
- temporary storage
- block scope
- persistent storage
- options a and b
10. The storage class type of internal static has
- persistent storage
- block scope
- file scope
- options a and b