Match the following : List – I List – II a. Automatic Storage Class i. Scope…

2014

Match the following :

List – I              List – II
a. Automatic Storage Class  i. Scope of the variable is global
b. Register Storage Class   ii. Value of the variable persists between different function calls
c. Static Storage Class    iii. Value stored in memory and local to the block in which the variable is defined
d. External Storage Class   iv. Value stored in CPU registers

Codes :

  1. A.

    a-iii; b-iv; c-i; d-ii

  2. B.

    a-iii; b-iv; c-ii; d-i

  3. C.

    a-iv; b-iii; c-ii; d-ii

  4. D.

    a-iv; b-iii; ci; d-ii

Attempted by 399 students.

Show answer & explanation

Correct answer: B

Correct matching: a-iii; b-iv; c-ii; d-i

  • Automatic Storage Class: Value stored in memory and local to the block in which the variable is defined. These are typical local (stack) variables whose lifetime ends when the block exits.

  • Register Storage Class: Value stored in CPU registers for faster access; the variable may not have an address (you usually cannot take its address).

  • Static Storage Class: Value of the variable persists between different function calls; the variable retains its value for the duration of the program.

  • External Storage Class: Scope of the variable is global (accessible across translation units, typically declared with extern).

Explore the full course: Mppsc Assistant Professor