A
Q. What will be the output of the following code?
Code:
#include <stdio.h>
int main() {
int i = 0;
for(i = 0; i < 3; i++) {
static int x = 0;
x++;
printf("%d ", x);
}
return 0;
}
int main() {
int i = 0;
for(i = 0; i < 3; i++) {
static int x = 0;
x++;
printf("%d ", x);
}
return 0;
}
- Correct Answer - Option(B)
- Views: 26
- Filed under category C Programming
- Hashtags:
Discusssion
Login to discuss.