What is the output of this program?
public class Question {
public static void main(String args[])
{
int i = 4;
System.out.print(--i * 8);
}
}
Answers
Answered by
0
Answer:
The output will be 24
Explanation:
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.
Similar questions