English

Write the value of n after execution: char ch = 'd'; int n = ch+5;

Advertisements
Advertisements

Question

Write the value of n after execution:

char ch = 'd';
int n = ch+5;
Numerical
Advertisements

Solution

105

Explanation:

ASCII code of 'd' is 100.

∴ 100 + 5 = 105

shaalaa.com
  Is there an error in this question or solution?
Chapter 1: Revision of Class 9 Syllabus - Exercises [Page 50]

APPEARS IN

Rupa Pandit Computer Applications [English] Class 10 ICSE
Chapter 1 Revision of Class 9 Syllabus
Exercises | Q 12. | Page 50
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×