✏️ Explanatory Question
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.