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
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
what are bit fields? What is the use of bit fields in a structure declaration?
Write a program that accept anumber in words
What is p in text message?
Explain what is the benefit of using #define to declare a constant?
What is the best way to comment out a section of code that contains comments?
What is a char c?
What is scope and lifetime of a variable in c?
How we can insert comments in a c program?
An instruction which is analysed and acted upon by the processor prior to the compiler going its work a) directive b) constructive c) constant d) absolute mode
Between macros and functions,which is better to use and why?
What are pointers?
What is difference between class and structure?
What are the functions to open and close the file in c language?
What are the types of i/o functions?