What will be the output of the following program on GCC compiler?
Practice Functions –
What will be the output of the following program on GCC compiler?
#include <stdio.h>
int fun(int);
int i;
int main(){
int j;
for(;;){
if(j=fun(i)){
printf("j=%d
",j);
}
else{
break;
}
}
return 0;
}
int fun(int x){
static int a=2;
a--;
return (a-x);
}