Which one of the following is NOT a storage class in C ?

2021

Which one of the following is NOT a storage class in C ?

Answer: D. Internal storage classCONCEPT In C, storage duration tells how long an object exists, whereas linkage tells whether declarations in different scopes or translation units denote the…

  1. A.

    Automatic storage class

  2. B.

    Static storage class

  3. C.

    External storage class

  4. D.

    Internal storage class

Attempted by 2 students.

Show answer & explanation

Correct answer: D

CONCEPT

In C, storage duration tells how long an object exists, whereas linkage tells whether declarations in different scopes or translation units denote the same entity. Traditional storage-class terminology includes automatic, register, static, and external classes; the corresponding specifiers govern lifetime, linkage, or both.

APPLICATION

  • Automatic storage class: a block-scope object normally exists only while execution is within its block.

  • Static storage class: the object exists for the full execution of the program.

  • External storage class: an extern declaration can refer to an entity defined in another translation unit.

  • Internal is linkage terminology, not a separate C storage class; file-scope static gives a name internal linkage.

CROSS-CHECK / CONTRAST

C provides the keyword static to give a file-scope name internal linkage; it does not provide an internal storage-class keyword. Therefore the value that is not a storage class is Internal storage class.

Explore the full course: Uppsc Computer Operator Grade B

Loading lesson…