What are Storage Classes in C ?
Answer Posted / sanath
Storage class determins the life time of the storage of an
identifier.
where the identifier is stored is determined by storage
class
Identifier means name given to a variable or a function.
There are 2 storage classes
1.Automatic storage class
2.static storage class
Automatic storage class
-----------------------
Variables declared within a function body are called
automatic variables.Auto is the keyword used to declare
automatic variables. By default and without the use of auto
keyword, the vaeiables inside the function are automatic
variables.auto matic variables are stored in stack.
Variables declared as register are also automatic they
are stored in fast registers of CPU.If sufficient number of
registers are not available, the register variables also
stored in stack.
When the function is calling these variables are
allocating memmory automatically. When the function is
finished and exits, the controll trnsfered to the calling
program the memory allocated will be destroyed.
2.Static storage class
-----------------------
| Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
Write a program to check palindrome number in c programming?
Explain how do I determine whether a character is numeric, alphabetic, and so on?
How does #define work?
a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor
What are the different types of linkage exist in c?
Write a code of a general series where the next element is the sum of last k terms.
Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.
Why do we use main function?
Is c is a high level language?
Distinguish between actual and formal arguments.
What do you mean by command line argument?
the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none
What is actual argument?
What is #include conio h?
What is the difference between printf and scanf )?