Create a free account on Computer Sir Ki Class and unlock access to valuable learning resources.
Exam Paper Downloads: After registering and logging in, you can download exam question papers in PDF format to practice and prepare for your exams.
Student Support: Get assistance with your doubts, queries, and questions related to your studies. Our support is here to help you understand topics and resolve your learning difficulties.
Register today and make your exam preparation easier and more effective!
char ch;
int x = 97;
do {
ch = (char) x;
System.out.print(ch + " ");
if (x % 10 == 0)
break;
++x;
} while (x <= 100);
Answer:
The output would be
a b c d
Notes:
Since the code has an integerΒ value type casted as character so in first essential entry do-while loop of it will print character a followed by a single space, then the loop continues till the value reaches 100 which is ascii code of d, so all the characters from a to d are printed with a following space.
C. Sir| Created: 5-Apr-2018 | Updated: 21-Apr-2026|ICSE2015