ICSE Class 10 Computer Applications
Question 27 of 30
Solved 2025 Specimen Paper ICSE Class 10 Computer Applications — Question 27
Back to all questionsX b
Step-by-Step Execution:
char ch = 'B';
chis assigned the character'B'.
char chr = Character.toLowerCase(ch);
Character.toLowerCase(ch)converts'B'to its lowercase equivalent'b'.chr = 'b'.
int n = (int) chr - 10;
(int) chrconverts the character'b'to its ASCII value.- ASCII value of
'b'is 98. n = 98 - 10 = 88.
System.out.println((char) n + "\t" + chr);
(char) n: Converts the integer88back to a character.- ASCII value
88corresponds to the character'X'.
- ASCII value
+ "\t" +adds a tab space between the characters.chr: The value ofchris'b'.