What will be the output of the following program on GCC?

		
					

Loading

โœช Choose the correct option.

What will be the output of the following program on GCC?

#include 
int increment();
int num;
int main(){
int i,j;
for(i=1;i<=3;i++){
j=increment();
printf("j=%d ",j);
}
printf("num=%d ",num);
return 0;
}
int increment(){
num++;
return (num);
}

A. j=1
j=2
j=3
num=3
B. j=1
j=2
j=3
num=0
C. j=1
j=2
j=0
num=0
D. Compiler error