answersLogoWhite

0

In C there are four storage classes: auto, static, extern and register. These storage classes essentially define the scope or visibility of a name (a function or variable). All four are inherited from B, the language from which C evolved.

  • The auto storage class is used to explicitly declare a non-static local variable. However, given that all non-static local variables are implicitly automatic in C, explicit use of the auto storage class is therefore redundant in C. Moreover, in C++11, explicit use of the auto storage class was dropped entirely; the auto keyword is now used for automatic type deduction in C++.
  • The static storage class is used to explicitly declare a static local variable. In addition, all global variables and functions are implicitly static and have external linkage, but if explicitly declared static they have internal linkage only.
  • The extern storage class is used to allow access to a name that has external linkage.
  • The register storage class is used to define a variable that should be allocated in a CPU register rather than in working memory (RAM).
User Avatar

Wiki User

9y ago

What else can I help you with?

Related Questions

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

automatic storage class


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 advantages of storage class in c?

advantage of storage classes


Explain the different access storage specifiers available in c?

The storage class specifiers in C and C++ are:autoexternmutableregisterstatictypedefA storage class specifier is used to refine the declaration of a variable, a function, and parameters


Auto in turbo c?

Storage class specifier.


Why you need to declare auto storage class specifier in c language?

We don't. The auto storage class is the default storage class for all local variables and is therefore completely redundant in C. It exists for no other reason than that C evolved from B and inherited all its storage classes (auto, static, extern and register).


What is storage classes in c plus plus?

AUTO EXTERN STATIC are the storage classes in c++


What is different storage class in c?

Different from what? Storage classes are auto, register, static, extern and typedef (formally).


What are the different storage class in C programming?

Automatic, register, external, static


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


What is storage claases in c language?

storage classes is important part of c language.WHENEVER we define any function in c program then we can call that in every definend class. there are four types of storage class. these are... 1 AUTO OR AUTOMATIC STORAGE CLASS 2 REGISTER STORAGE CLASS 3 STATIC STORAGE CLASS 4 EXTERNALSTORAGE CLASS 1) The features of "AUTOMETIC" storage class are as under some conditions: storage : storage will be in memory. value : garbage value. scope : scope is local to block to the variable. life : till, controls remain within the block. 2) The featurs of "STATIC" storage class are as under some conditions: storage : memory. value : zero. scope : local to block. life : Till control remains within the block. 3) The featurs of "REGISTER" storage class are as under some conditions: storage : register. value : garbage value. scope : local to the block. life : value persists between variable. 4) The feature of "EXTERNAL" storage class are as under some conditions: storage : memory. value : zero. scope : local to block. life : till controls remains within the block.


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