state the value of n and ch.
char c=’a’;
int n=c-30;
char ch=(char)n;
Answers
Answered by
2
Question:-
State the value of n and ch.
Solution:-
Given,
char c='a';
int n=c-30;
char ch=(char)n;
ASCII value of 'a' is 97
n=97-30=67
ch=(char)67 ='C'
Output:-
n=67
ch='C'
Similar questions