Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What are Storage Classes in C ?

Answer Posted / sanath

Storage class determins the life time of the storage of an
identifier.
where the identifier is stored is determined by storage
class
Identifier means name given to a variable or a function.

There are 2 storage classes
1.Automatic storage class
2.static storage class

Automatic storage class
-----------------------
Variables declared within a function body are called
automatic variables.Auto is the keyword used to declare
automatic variables. By default and without the use of auto
keyword, the vaeiables inside the function are automatic
variables.auto matic variables are stored in stack.
Variables declared as register are also automatic they
are stored in fast registers of CPU.If sufficient number of
registers are not available, the register variables also
stored in stack.
When the function is calling these variables are
allocating memmory automatically. When the function is
finished and exits, the controll trnsfered to the calling
program the memory allocated will be destroyed.
2.Static storage class
-----------------------

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do string constants represent numerical values?

1341


Explain how many levels deep can include files be nested?

1041


Explain what is the difference between a string and an array?

1120


Explain what is operator promotion?

1035


What do you mean by invalid pointer arithmetic?

1016


What is the condition that is applied with ?: Operator?

1086


What is difference between function overloading and operator overloading?

1060


Explain continue keyword in c

975


Can we change the value of constant variable in c?

1016


How do you do dynamic memory allocation in C applications?

1059


Function calling procedures? and their differences? Why should one go for Call by Reference?

1058


What is the best way of making my program efficient?

980


Are c and c++ the same?

1014


What is call by value in c?

963


what is reason of your company position's in india no. 1.

2257