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
Multiply an Integer Number by 2 Without Using Multiplication Operator
Describe the modifier in c?
Sir i need notes for structure,functions,pointers in c language can you help me please
What does nil mean in c?
the process of defining something in terms of itself is called (or) in C it is possible for the functions to call themselves. A function called a) nested function b) void function c) recursive function d) indifinite function
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
How #define works?
Why do we use stdio h and conio h?
Between macros and functions,which is better to use and why?
What is the size of array float a(10)?
Differentiate between static and dynamic modeling.
Explain how do you list a file’s date and time?
Explain how can type-insensitive macros be created?
Explain what are header files and explain what are its uses in c programming?
Explain threaded binary trees?