0

Guys how it is going to be 6?

int a = 8; int b = ++a; if ( a > 5 ) b -=3; else b=9; console.write line(b);

12th Dec 2016, 9:32 AM
Faisal Raufi
Faisal Raufi - avatar
4 Answers
+ 4
b = ++a; // 9 if ( 9 > 5) true b = 9 - 3 ; // 6
12th Dec 2016, 9:36 AM
Vipul Walia
Vipul Walia - avatar
+ 2
i want to correct vipul it must be 9>5 instead 8>5 u wrote
12th Dec 2016, 9:41 AM
manish rawat
manish rawat - avatar
+ 1
@manish rawat Thank you for correction. 👍
12th Dec 2016, 2:24 PM
Vipul Walia
Vipul Walia - avatar
0
int a=8; int b= ++a; if(b>5) b-=3; else b=b console.WriteLine(b);
12th Dec 2016, 10:14 AM
Akwin Lopez
Akwin Lopez - avatar