1.

What is the output of this program? public class Question { public static void main(String args[]) { int i = 4; System.out.print(--i * 8); } }

Answer»

The output will be 24Explanation:the output statement is --i * 8 which means pre-decrementation of i multiplied by 8 i.e. 1 - i X 8, so the VALUE of i is 4 and if we substract 1 from 4 then it's 3 and then multiply it by 8, the RESULT is 24.



Discussion

No Comment Found