Which variable will retain its value across multiple calls?
#include <stdio.h>
void fun() {
auto int x = 0;
x++;
printf("%d ", x);
}
int main() {
fun();
fun();
return 0;
}
1 1
1 2
2 3
0 1
This question is part of this quiz :
Storage Classes and Type Qualifiers in C