🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: C Output Questions: all 10 questions

Quiz: C Output Questions · Question 1 of 10

What does this print? (code)

What does this print?

#include <stdio.h>
int main(void) {
    int a = 5;
    int b = a++ + 10;
    printf("%d %d", a, b);
    return 0;
}
  1. A.5 15
  2. B.6 15
  3. C.6 16
  4. D.5 16
Answer & explanation

Correct answer: 6 15

a++ uses 5 (b = 15), then a becomes 6.

Can you get the rest right without peeking?

Take the timed Quiz: C Output Questions quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →