top of page

Frequently Asked C Language Interview Question & Answers

What are the different storage classes in C?

C has three types of storage classes: automatic, static and allocated.

  1. Variable having block scope and without static specifier have automatic storage duration.

  2. Variables with block scope, and with static specifier have static scope.

  3. Global variables (i.e, file scope) with or without the static specifier also have static scope.Memory obtained from calls to malloc(), alloc() or realloc() belongs to storage class.

Close
bottom of page