What are Storage Classes in C ?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / vijoeyz
C has three types of storage: automatic, static and
allocated.
Variable having block scope and without static specifier
have automatic storage duration.
Variables with block scope, and with static specifier have
static scope. Global variables (i.e, file scope) with or
without the the static specifier also have static scope.
Memory obtained from calls to malloc(), alloc() or realloc()
belongs to allocated storage class.
--
http://www.geocities.com/vijoeyz/faq/
| Is This Answer Correct ? | 27 Yes | 282 No |
hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..
What is scope of variable in c?
write a method for an array in which it can display the largest n next largest value.
The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this
what will be the output off the following program? #include<stdio.h> int main() { int a; a=015+0*71+5; printf("%d,a"); return0; }
What are dangling pointers?
write a code for large nos multilication (upto 200 digits)
What does a function declared as pascal do differently?
Average of a couple 10 years ago was 25. The average remains same after having a child and twins after 3 years. What is the present age of the first child
How can I call fortran?
What are near, far and huge pointers?
0 Answers Hexaware, Thomson Reuters, Virtusa,
Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result