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


Please Help Members By Posting Answers For Below Questions

What are control structures? What are the different types?

588


Can a pointer point to null?

579


Place the #include statement must be written in the program?

563


What is the mean of function?

642


What are runtime error?

618






What is a program flowchart and how does it help in writing a program?

653


What is the difference between exit() and _exit() function in c?

574


How many types of operators are there in c?

610


write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?

2401


How to explain the final year project as a fresher please answer with sample project

462


What is the difference between single charater constant and string constant?

615


WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..

1586


which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;

2385


WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?

1853


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.

1654