+ 3

Int a; a=5>=5; cout<<a; what is the output?

24th Apr 2018, 12:33 PM
Elham Keshavarz
Elham Keshavarz - avatar
3 odpowiedzi
+ 3
1 because 5>=5 is true
24th Apr 2018, 12:39 PM
Aaron Eberhardt
Aaron Eberhardt - avatar
24th Apr 2018, 12:41 PM
Elham Keshavarz
Elham Keshavarz - avatar
+ 1
1 because >= has higher precedence than =, so first 5>=5 becomes 1 and after it becomes the value of a. so,output is 1.
9th May 2018, 8:05 AM
Bhautik Donga
Bhautik Donga - avatar