- 1
Explain the code
Output is 1
7 Antworten
+ 5
Ajith first you need to know that a condition either returns true or false which is also represented by a 1 and 0 in C.
i = x<y<z;
So the compiler checks whether x<y which is 10<20 and it is true so it returns 1.
Now the next condition is checked which is whether 1<20 and it is true again and it also returns 1 which is stored in 'i'.
+ 1
Ajith what's you question bro??
0
int x=10,y=20,z=5,i;
i=x<y<z;
printf ("%d\n",i);
0
I posted in comment
0
Output is 1
0
Okie thank you again