+ 2
What is the output , code is in C ?
int main() { int i,j,s; i=0; j=(0,23); A: printf ("%d\n",i+=5); printf ("%d\n",i-=7); if (i<=5&&i>=-5) goto A; s=((i!=j)&&(j)); printf ("%d\n",s); return 0; }
2 Respostas
+ 2
Yes @Daniel, ',' operator execute all statements but return the result of the last one, here 23
Output :
5
-2
3
-4
1
-6
1 // j == 23 which is different from -6, so s is 1
0
j is an int?:-0