C Output Prediction Easy +10 XP
Character Arithmetic
What does this print?
CRead-only
char c = 'A';
printf("%c", c + 1);What is the output?
Show answer and explanation
Answer: B
'A' has ASCII value 65. Adding 1 gives 66 which %c formats as 'B'.
Hint: Characters are just integers in C.
What this challenge tests
Output Prediction in C: chars, ascii.