Multiple choice

What will be the output of the following C code? void main() { char ch=321; printf(%d %c,ch,ch); }

  1. 65 A

  2. 66 B

  3. 67 C

  4. 97 A

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The value of ch is outside the range of char (-128 to +127). So, it goes to other the side and becomes 65. Hence, the ASCII value of 'A' = 65