‹ Back to the paper
Question 17
2 marks
Computer ScienceISC 2022 Computer Science - Specimen paper (Semester 1), Paper 1MCQPrimitive values, Wrapper classes, Types and casting
Choose the correct option.
What is the output of the statement given below? System.out.print('A' + '1' + 'C');
- (a)65+1+66
- (b)10+1+67
- (c)181
- (d)65+49+67
Answer
Answer
Correct option: (c)
Answer: (c) 181
Chars are added as their ASCII codes: 65 + 49 + 67 = 181.