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

Explain how do you print an address?

0 Answers  


Define the scope of static variables.

0 Answers  


What is c programing language?

0 Answers  


Program to display given 3 integers in ascending order

1 Answers   N Tech,


find second largest element in array w/o using sorting techniques? use onle one for loop.

15 Answers   BitWise, Zycus Infotech,






What is a substring in c?

0 Answers  


Describe the order of precedence with regards to operators in C.

0 Answers  


write a program to print sum of each row of a 2D array.

4 Answers  


diff .between strcture and union

2 Answers  


Explain what is output redirection?

0 Answers  


Tell me a C program to display the following Output? 1 1 1 1 1 2 2 2 2 3 3 3 4 4 5

3 Answers  


why we use "include" word before calling the header file. is there any special name for that include??????

1 Answers   TCS,


Categories