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
Explain do array subscripts always start with zero?
What is signed and unsigned?
how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions
What is pivot in c?
Can you explain what keyboard debouncing is, and where and why we us it? please give some examples
What is %d called in c?
How are variables declared in c?
What is 2 d array in c?
Explain how can I right-justify a string?
Does c have an equivalent to pascals with statement?
What is the benefit of using an enum rather than a #define constant?
Tell me can the size of an array be declared at runtime?
What is the difference between the = symbol and == symbol?
Where register variables are stored in c?
What are the advantages of c preprocessor?