ascii value of character – Computer Sir Ki Class

Login


Lost your password?

Don't have an account ?
Register (It's FREE) ×
  

Login
[lwa]



Exam Questions-ICSE2018-02A #JAVA#4035    siteicon   siteicon  

Problem Statement - ascii value of character

(1) int res = ‘A’;
What is the value of res?

(ii) Name the package that contains wrapper classes.

Solution

TC++ #4035

since ‘A’ char is being stored in an integer variable res so in memory it will be stored as binary of A which will be 65 (Ascii code of A) if printed as a decimal value.

Notes

  • This is a case of character to integer implicit conversion.


Share

sunmitra| Created: 24-Mar-2018 | Updated: 12-Apr-2019|ICSE2018






Back