please help!
really so urgent~
thanks!
Attachments:
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:
Similar questions