Computer Science, asked by 278raghav, 3 months ago

What would be the output of the following program segments? Give reasons to justify your answer.

[10]

i) System.out.print(“Sum =”+6 + 2);

ii) System.out.print(“Sum = ”+ ‘B’+ ‘2’);

iii) System.out.print(“Sum = ”+ 6 + ‘B’);

iv) System.out.print(“Sum = ”+ (‘B’ + ‘a’));

v) System.out.print(“Sum = ”+ “B” + “a”);​

Answers

Answered by Rachel2004
0

OUTPUT:

i) Sum =62

ii)Sum = B2

iii)Sum = 6B

iv)Sum = 163

v)Sum = Ba

Similar questions