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

How many types of functions are there in c?

576


What does emoji p mean?

589


What are the __date__ and __time__ preprocessor commands?

559


Explain null pointer.

612


Is c is a low level language?

552






Explain how can I avoid the abort, retry, fail messages?

579


What is the difference between variable declaration and variable definition in c?

549


What is the benefit of using const for declaring constants?

574


Why can’t we compare structures?

801


What is the difference between a string and an array?

699


What are reserved words?

639


What is the difference between text and binary modes?

632


How to establish connection with oracle database software from c language?

1660


Why ca not I do something like this?

580


What is getche() function?

597