Code AnalysisHard 60s
Trace: Static Variable
What does f() return on 3rd call?
Starter code
#include <stdio.h>
int f() {
static int x = 0;
return ++x;
}
int main() {
f();
f();
printf("%d", f());
return 0;
}Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.