+ 1
Why this output is "1"?? please explain....
#include<stdio.h> int main() { int x=5, y=10, z=10; x=y==z; printf("%d", x); return 0; }
6 Respuestas
+ 2
because you are assigning an expression so y == z its true so true == 1
+ 1
#include<stdio.h>
int main()
{
int x,y=10;
char z='a';
x=y+z;
printf("%d", x);
return 0;
}
Output??
+ 1
it gives you 107 because it is taking the ASCII of 'a' that is 97 so you got x = 10 + 97 = 107
0
thank you.
0
is 'single_quotation' meaning of ASCII number? does it ('a') has another meaning??
0
actually 'a' is a character but as the variable that gets the result is of type int you can't concatenate 10+'a' that's why it takes the ASCII number