Question PRG-C-0005
EasyWhat is the output of this program?
#include <stdio.h>
int main(void) {
char c = 'A';
printf("%c", c + 1);
return 0;
}
- A.
66
- B.
B
- C.
Show answer and explanation
Answer: B
Characters are small integers: 'A' + 1 is 66, which %c prints as 'B'.