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
How do I get an accurate error status return from system on ms-dos?
Write the control statements in C language
What is use of pointer?
Is it fine to write void main () or main () in c?
How can I ensure that integer arithmetic doesnt overflow?
What are the keywords in c?
What are header files why are they important?
How are pointers declared in c?
#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }
how many errors in c explain deply
Why c is known as a mother language?
How do you search data in a data file using random access method?
Define recursion in c.
What is typedef struct in c?
What is the use of pragma in embedded c?