What are Storage Classes in C ?
Answer Posted / babu
There are two storage classes : Automatic and Static.
Automatic objects are local to block,and are discarded on
exit from the block.Declaration with in a block create
automatic objects if no storage class spections is
mentioned , or if the auto specifier is used.Object
declared as register are automatic,and are (if Possible)
stored in fast registers of the machine.
Static obj may be local to a block or external to all
blocks,but in either case retain their values across exit
from and reentry to function and blocks.Within a block
including a block that provides the code for a function,
static objects are declared with the keyword Static.
The objects declared outside all blocks,at the same level
as function definitions,are always static keyword;this
gives them Internal Linkage.
They become global to an entire program by omitting an
explicit storage class ,or by using keyword Extern;this
gives external linkage.
| Is This Answer Correct ? | 44 Yes | 166 No |
Post New Answer View All Answers
What are the different types of pointers used in c language?
How to Throw some light on the splay trees?
Write programs for String Reversal & Palindrome check
Differentiate between #include<...> and #include '...'
Differentiate abs() function from fabs() function.
What is a structure in c language. how to initialise a structure in c?
Can we change the value of static variable in c?
Can you tell me how to check whether a linked list is circular?
Explain how can I avoid the abort, retry, fail messages?
Explain main function in c?
Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1
What is n in c?
How many identifiers are there in c?
What is #include conio h?
What are header files? What are their uses?