Computer Science, asked by imrankhan1782, 6 months ago

a) State the output of the following program segment according to the inputs as [04]

mentioned with each part:

if(x++ == 11)

System.out.print(“ RESULT IS 11 ”);

else if(++x == 10)

System.out.print(“ RESULT IS 10 ”);

else if(– –x == 10)

System.out.print(“ RESULT IS 10 ”);

else

System.out.print(“ RESULT IS NEITHER 10 NOR 11 ”);

i) x=9 ii) x=10 iii) x=11 iv) x=12

……………………………………………………………………………………

Answers

Answered by dattarajshinde44
4

Answer:

i) x=9

RESULT IS 10

ii) x=10

RESULT IS NEITHER 10 NOR 11

iii) x=11

RESULT IS 10

iv) x=12

RESULT IS 11

Similar questions