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
Explain the use of keyword 'register' with respect to variables.
Explain a pre-processor and its advantages.
Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record
Explain what is a 'locale'?
Difference between pass by reference and pass by value?
What is far pointer in c?
What is a good data structure to use for storing lines of text?
What are 'near' and 'far' pointers?
Give basis knowledge of web designing ...
Do pointers store the address of value or the actual value of a variable?
How do you sort filenames in a directory?
What is c variable?
How do I convert a string to all upper or lower case?
What is scope rule of function in c?
Are there namespaces in c?