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
What are control structures? What are the different types?
Can a pointer point to null?
Place the #include statement must be written in the program?
What is the mean of function?
What are runtime error?
What is a program flowchart and how does it help in writing a program?
What is the difference between exit() and _exit() function in c?
How many types of operators are there in c?
write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?
How to explain the final year project as a fresher please answer with sample project
What is the difference between single charater constant and string constant?
WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..
which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;
WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?
1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.