-
What is the output of this program?
public class operators
{
public static void main(String args[])
{
int p = 10;
System.out.println(++p * 5 + " " + p);
}
}
-
- 44 11
- 33 11
- 55 11
- 66 11
- 11 55
Correct Option: C
Operator ++ has higher precedence than multiplication operator, *, p is incremented to 11 than multiplied with 5 giving 55.
output: 55