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
#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }
What does %2f mean in c?
What are nested functions in c?
Write a program to swap two numbers without using a temporary variable?
What is the collection of communication lines and routers called?
Can a variable be both const and volatile?
Why doesnt the call scanf work?
How can I insert or delete a line (or record) in the middle of a file?
What is strcpy() function?
You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.
why do some people write if(0 == x) instead of if(x == 0)?
What is data types?
Explain how can I remove the trailing spaces from a string?
Explain what is the difference between far and near ?
What is a pointer value and address in c?