0
Whatis the result of the following code?
void main() { int a,b=10; if((a=b=1)==1)cout<<a<<":"<<b;}
5 Réponses
+ 1
1:1. this is the result
0
you set in your second line a and b equal to 1, so firsthand eitherway if a or b comes out it will be "1"
if you want to know which value comes out its the value of a. As you set a and b equal to , the condition (a=b==1) will be true.
I cannot guarantee for syntax though
0
Hey man you gave National Cyber Olympiad(NCO). Today?????
The answer is. 1:1.
0
1:1
0
will some one elaborate the code and explain