answersLogoWhite

0


Best Answer

There are four storage class specifiers in C and C++. These are -

1. auto : The storage specifier auto refers to automatic variable declaration. The life of an automatic variable is the time during which its parent function is running. The scope of an auto variable is the function scope. They can be accessed only from their parent functions.

Syntax : auto int a;

2. register : A register variable has all the characteristics of an auto variable. The only difference is that auto variable uses the main memory to store data and register uses the CPU registers.

3. extern : This storage specifier is used to declare a global variable. The life of these variables is the time during which the program runs.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are the functions of a storage class?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Why inline functions shall not be defined with extern or static storage class?

inline itself should be considered as a storage class


By default functions will be the static storage class?

No, you have to make them static explicitly.


What is storage class Define storage class with the help of example?

the storage class is define as 10th class and 9th class and the examples are 10b and 9a


What are the storage classes in c?

A storage class defines the visibility and lifetime of variables or/and functions within a C Program. There are following storage classes which can be used in a C Program: auto register static extern


Storage classes available in c language?

There are four types of storage class or variable in c. 1) auto storage class. 2) register storage class. 3) static storage class. 4) external storage class.


What is the difference between auto int a and int a?

Nothing: 'auto' is usable only in functions, and there it is the default storage class, so you don't have to use it at all.


What is the by default storage class of any variable in c?

automatic storage class


What is the function of fats in animal cell?

Fat functions as energy storage devices, as insulators in animals. Fat functions as energy storage devices, as insulators in animals. Fat functions as energy storage devices, as insulators in animals.


What are the functions of Network Access Storage?

what are the functions of local area network


What functions get executed when you inherit from a class with the same functions name?

In general, the child class's functions will be used in place of the parent.


What are the two functions of the cabinet?

storage and decoration


What is the advantages of storage class in c?

advantage of storage classes