Q:

WHAT IS THE DIFFERENCE BETWEEN AUTO VARIABLE AND STATIC VARIABLE IN C?

belongs to collection: C INTERVIEW QUESTIONS AND ANSWERS

0

WHAT IS THE DIFFERENCE BETWEEN AUTO VARIABLE AND STATIC VARIABLE IN C?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Both auto and static variables are local variables.

Static variables can retain the value of the variable between different function calls.

But, scope of auto variable is within the function only. It can’t retain the value of the variable between different function calls.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C INTERVIEW QUESTIONS AND ANSWERS

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
WHERE SHOULD TYPE CAST FUNCTION NOT BE USED IN C?... >>
<< WHAT IS THE DIFFERENCE BETWEEN AUTO VARIABLE AND R...