English, asked by kingtaehyung190, 1 month ago

State the values of n and ch. char c=‘A’; int n=c+1; char ch=(char)n;​

Answers

Answered by Anonymous
7

Answer:

ANSWER :-

Value of n is 66 and ch is B.

int n = c + 1, here due to implicit conversion, 'A' will be converted to its ASCII value 65. 1 is added to it making the value of n 66.

char ch = (char)n, here through explicit conversion 66 is converted to its corresponding character that is 'B' so value of ch becomes B.

hope it's helpful for you ✌️✌️

drop some thanks plz...

Similar questions
Math, 9 months ago