please help!
really so urgent~
thanks!
Attachments:
![](https://hi-static.z-dn.net/files/dfb/f89f1a9559c8abbdbb4a1ca541e6a2cf.jpg)
Answers
Answered by
7
Given códe(Corrected):-
char c='A';
int n=c+1;
char ch= (char)n;
Required Answer:-
- n=66
- ch= B
Explaination:-
char c='A';
//Currently, c='A' and ASCII value of 'A' is 65
int n=c+1;
//n= 65+1 = 66. (Remember ASCII value of A is 65
char ch= (char)n;
//Now ch will store Character value of 66 that is B
- Refer to the attachment
- Attachment 1 showing value of n and ch
- Attachment 2 showing ASCII table
Attachments:
![](https://hi-static.z-dn.net/files/d5f/f82581f6b883bf5b3abef59abfaea276.jpg)
![](https://hi-static.z-dn.net/files/d9c/cd79142a45d48c83156d550331082ec8.jpg)
Similar questions