What are Storage Classes in C ?
Answer Posted / laxmikant
C supports 4 types of storage class. They are given
hereundr:-
1> Extern
2> static
3> Register
4> Auto
By default a variable defined inside a block is a auto
variable.It has block level scope.Regsiter storage class
indicates that the variable is stored in the CPU rather
than Memory. So the opeartion is faster because accessing
register is faster then memory.Extern indicates that the
effect of the variable is realised in every object modules.
And finally static .If it is defined inside the
function ,then it's retian its value during different
function call.And it's life is through out the program.And
it's initilized only once.
Is This Answer Correct ? | 27 Yes | 9 No |
Post New Answer View All Answers
Write a program to check prime number in c programming?
Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon
Is there any data type in c with variable size?
Write a code of a general series where the next element is the sum of last k terms.
What is memcpy() function?
What is sizeof int in c?
What is string in c language?
What is extern storage class in c?
How can you increase the size of a statically allocated array?
In which header file is the null macro defined?
What are the two forms of #include directive?
what is recursion in C
Why clrscr is used after variable declaration?
What is the difference between malloc calloc and realloc in c?
Why do we use int main?