← Quiz: C Introduction: all 10 questions
Quiz: C Introduction · Question 7 of 10
What does this print? (code)
What does this print?
#include <stdio.h>
int main(void) {
printf("%d %c\n", 'A' + 1, 'A' + 1);
return 0;
}
- A.B B
- B.65 A
- C.66 B
- D.A1 B
Answer & explanation
Correct answer: 66 B
A character is stored as a number ('A' is 65). %d prints the number 66, %c prints the character with that code, B.
Can you get the rest right without peeking?
Take the timed Quiz: C Introduction quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →