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
How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?
Explain how does flowchart help in writing a program?
define string ?
write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3
Explain how can I pad a string to a known length?
What is the use of getchar functions?
How can I access an I o board directly?
How do we open a binary file in Read/Write mode in C?
the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?
What is property type c?
What are the types of assignment statements?
What are operators in c?
Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.
Simplify the program segment if X = B then C ← true else C ← false
What is wrong with this initialization?