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 / monika

There are four types of storage classes in c. It defines the
scope and lifetime of a variable or function.

1. auto - This is the default storage class. Auto can only
be used with in functions. i.e. only for local variables,
not for globals.

2. register - The variables declared using the register
storage class may stored in cpu registers instead of RAM.
Since it doesn't have a memory location, the '&' operator
for getting the address of the variable cannot be applied
(in C). This storage class cannot be used for global scope data.

3. static - This is the default storage class for global
variables. In case of local variable, it is initialized at
compile time and retains its value between the calls. By
default the static variables will be initialized to zero,
incase of pointer variable initialized to NULL.

4. extern - Defines the global variables that is visible to
all object modules. This type of variables cannot be
initialized, since it is pointing to a storage location,
where it is previously define.

Is This Answer Correct ?    31 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is structure in c language?

1173


What is the most efficient way to count the number of bits which are set in an integer?

1053


Is stack a keyword in c?

1080


What is variable initialization and why is it important?

1257


What are the complete rules for header file searching?

1077


What is struct node in c?

1075


WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.

2447


Write a program to swap two numbers without using third variable?

1299


Why doesnt the call scanf work?

1195


write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?

2132


What does it mean when the linker says that _end is undefined?

1097


Explain the difference between strcpy() and memcpy() function?

1000


What is array of structure in c?

1175


Explain how can I read and write comma-delimited text?

1161


i want to know the procedure of qualcomm for getting a job through offcampus

2471