+ 1
++A + ++A=?
if we take A=0 initially . I get the output as 4 in code::blocks see the program:- #include<studio.h> void main() { int a=0,b; b=++a + ++a; printf("%d", b); }
7 Réponses
+ 5
I presume you executed this code in C++, where both increments are done first. So, 'A' becomes 2 and the result is 2 + 2 which is 4 in C++.
In JavaScript, 1 + 2 which is 3 will be the result.
+ 3
try again
save with .c
+ 2
3
+ 2
Yes it would be 4
+ 1
actually result is 4 how it possible
0
but Yash, I got 4 when I run the program!!
0
in Turbo, it gives 3!!😐🤔