What are the different types of Storage classes?

Questions by suji   answers by suji

Showing Answers 1 - 15 of 15 Answers

Lily

  • Sep 28th, 2005
 

There are four types of storage class: automatic, register, external, and static.

Prabhuram Jagadeesan

  • Jul 25th, 2007
 

Storage class defined for a variable determines the accessibility that is what portion of the program could have access to the variable and also the longevity of the variable that is how long the variable would exist.


Different types of storage classes variable in C++ are:


Automatic
External
Static


http://www.exforsys.com/tutorials/c-plus-plus/storage-classes-in-c.html

susant chandra sarangi

  • Aug 10th, 2007
 

Along with these 4 type auto, ststic, extern and register we can add "volatile"

  Was this answer useful?  Yes

Volatile is not a storage class.  A storage class defines where the value of the variable is stored. 
Volatile tells the compiler that the variable may be modified by code that is not apparent to the compiler... so therefore, don't get smart and try to optimize it away.

srivallabh

  • Jul 24th, 2011
 

extern,auto,register,static.

  Was this answer useful?  Yes

prerna chavan

  • Jul 25th, 2011
 

External,
Register,
Static,
Automatic

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions