Question 91
What is the output printed by the following program?
#include <stdio.h>
int fun(int n) {
static int s = 91;
s += n;
return s;
}
int main(void) {
fun(5);
printf("%d", fun(5));
return 0;
}Detailed Solution
First call fun(5) updates s from 91 to 96. Second call fun(5) updates s from 96 to 101 and returns 101.