what is the difference between auto and static keywords



what is the difference between auto and static keywords..

Answer / dr. guruprasad

auto and static are both storage classes.
if a variable is declared as auto - then the life of it will be only till function block.
if static - then value persists between various function call. Life till program ends.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

0 Answers  


what is difference between array of characters and string

18 Answers   Accenture, Nest,


Why main is not a keyword in c?

0 Answers  


Differentiate Source Codes from Object Codes

1 Answers  


How do c compilers work?

0 Answers  






What is the importance of c in your views?

0 Answers  


what is the use of pointers

6 Answers   Adobe, GrapeCity,


any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above

0 Answers  


I have a varargs function which accepts a float parameter?

0 Answers  


if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0

0 Answers  


who is the founder of c

19 Answers   College School Exams Tests, HP,


What is a char in c?

0 Answers  


Categories