Q&A ICSE2017-02E #7229
Question:
Write the output:
char ch = ‘F’;
int m = ch;
m=m+5;
System.out.println(m + ” ” + ch);
Answer:
ch = âFâ
int m = ch; â ASCII value of âFâ i.e. 70 will be assigned to m
m = m + 5 = 70 + 5 = 75
System.out.println(m+ â â +ch); â 75 F
Output is
75 F
