Fundamentals - [C'Language]

♠ Posted by Unknown in at 10:02

Storage Classes of Variables in C Language:

Variables in C can have not only data type but also storage class that provides information about their location and visibility.  The storage class decides the portion of the program within which the variables are recognized. For now, remember that there four storage class specifiers (auto, register, static, and extern) whose meanings given below.

STORAGE CLASS

MEANING

auto

Local variable known to only to the function in which it is declared. Default is auto.

static

Local variable which exists and retains its value even after the control is transferred to the calling function.

extern

Global variable known to all functions in the file.

register

Local variable which is stored in the register.

0 comments:

Post a Comment