This set of C Multiple Choice Questions & Answers (MCQs) focuses on “Automatic Variables – 2”.
Pre-requisite for this C MCQ set: Advanced C Programming Video Tutorial.
1. Automatic variables are _________
a) Declared within the scope of a block, usually a function
b) Declared outside all functions
c) Declared with the auto keyword
d) Declared within the keyword extern
2. What is the scope of an automatic variable?
a) Exist only within that scope in which it is declared
b) Cease to exist after the block is exited
c) Exist only within that scope in which it is declared & exist after the block is exited
d) All of the mentioned
3. Automatic variables are allocated memory in ___________
b) Data segment
c) Code segment
4. What will be the x in the following C code?
a) automatic variable
b) static variable
c) register variable
d) global variable
5. Automatic variables are initialized to ___________
b) Junk value
d) Both Zero & Junk value
6. Which of the following storage class supports char data type?
d) all of the mentioned
7. A local variable declaration with no storage class specified is by default _________
Sanfoundry Global Education & Learning Series – C Programming Language.
To practice all areas of C language, here is complete set of 1000+ Multiple Choice Questions and Answers.