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

List the different types of c tokens?

0 Answers  


How can I automatically locate a programs configuration files in the same directory as the executable?

0 Answers  


What are the types of pointers in c?

0 Answers  


difference between memcpy and strcpy

1 Answers  


Explain the use of bit fieild.

0 Answers  






How to reverse alternate words in a given line of string For Eg: my name is narasimha output : my eman is ahmisaran

0 Answers  


How do you view the path?

0 Answers  


FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above

0 Answers  


Does c have function or method?

0 Answers  


what is the return type of printf

3 Answers  


Write a program to check armstrong number in c?

0 Answers  


When should you use a type cast?

0 Answers  


Categories