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

What is the difference between functions getch() and getche()?

1141


Is c compiled or interpreted?

1251


When is the “void” keyword used in a function?

1586


What do you understand by friend-functions? How are they used?

1257


What are structures and unions? State differencves between them.

1256


What is pointer and structure in c?

1287


How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?

1081


Explain what is gets() function?

1121


What are different types of variables in c?

1130


What is the Purpose of 'extern' keyword in a function declaration?

1149


What is the use of getchar() function?

1186


a c code by using memory allocation for add ,multiply of sprase matrixes

2865


How can I find out the size of a file, prior to reading it in?

1225


Can a variable be both constant and volatile?

1185


What is the purpose of sprintf() function?

1188