0
Please explain the flow friends
while running the code the output comes as 6.. I don"t know how the 6 comes. #include <stdio.h> int main() { int a=-3; a=-a-a+!a; printf ("%d\n",a); return 0; } Can anyone say how it comes???
2 Antworten
+ 1
a is -3
-a is 3
3 - (-3) = 6
then comes the confusing part, "+!a"
in C, anything other than 0 is considered true, so "!a" equates to 0
6 + 0 = 6
thus the final result is 6
+ 1
hinanawi thank you so much😊😊😊