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 is the basis for selection of arrays or pointers as data structure in a program
Is c language still used?
What is a loop?
What does *p++ do? What does it point to?
Do pointers store the address of value or the actual value of a variable?
What are valid signatures for the Main function?
Can a void pointer point to a function?
A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile
What are unions in c?
Write a program of prime number using recursion.
please explain every phase in the "SDLC" in the dotnet.
What are dangling pointers in c?
What is clrscr in c?
What are the types of pointers in c?
What is the difference between typedef struct and struct?