What are Storage Classes in C ?
Answer Posted / bibhuti bhusan basantaray
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 ? | 17 Yes | 11 No |
Post New Answer View All Answers
How many types of functions are there in c?
What does emoji p mean?
What are the __date__ and __time__ preprocessor commands?
Explain null pointer.
Is c is a low level language?
Explain how can I avoid the abort, retry, fail messages?
What is the difference between variable declaration and variable definition in c?
What is the benefit of using const for declaring constants?
Why can’t we compare structures?
What is the difference between a string and an array?
What are reserved words?
What is the difference between text and binary modes?
How to establish connection with oracle database software from c language?
Why ca not I do something like this?
What is getche() function?