Question:

Choose the set of storage classes in C language.

Show Hint

The four storage class keywords in C are: auto, register, static and extern.
Updated On: Jun 25, 2026
  • Auto, register, static, extern
  • Auto, static, global, extern
  • Register, cache, main, extern
  • Disk, tape, drum, flash drive
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Concept: Storage classes in C define:
• Scope of a variable
• Lifetime of a variable
• Visibility of a variable
• Storage location The four standard storage classes in C are: \[ \text{auto} \] \[ \text{register} \] \[ \text{static} \] \[ \text{extern} \]

Step 1:
Study the storage classes.
auto: Default storage class for local variables. register: Requests storage in CPU registers for faster access. static: Preserves variable value throughout program execution. extern: Allows access to globally defined variables.

Step 2:
Analyze the options.
Option (A) contains all four valid storage classes. Option (B) contains "global" which is not a storage class keyword. Option (C) contains invalid entries such as cache and main. Option (D) contains storage devices rather than storage classes.

Step 3:
Select the correct option.
Hence the correct set is \[ \boxed{\text{Auto, Register, Static, Extern}} \] Therefore option (A) is correct.
Was this answer helpful?
0
0