- 2

Find the output...??

class increment { public static void main (string args[]) { int g=3; System.out.println(++g*8); } }

23rd Sep 2017, 1:35 PM
Yuvarajan N
Yuvarajan N - avatar
2 Answers
+ 12
Pre increment operator increments g by 1 and then multiplies it with 8 i.e. 4*8 = 32!
23rd Sep 2017, 1:43 PM
Dev
Dev - avatar
+ 6
Use Code Playground ~_~
23rd Sep 2017, 2:07 PM
Ekansh