WHAT IS THE DIFFERENCE BETWEEN AUTO VARIABLE AND STATIC VARIABLE IN C?
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.
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
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