C Programming MCQs — Programming

3 practice MCQs

The correct answer is marked on every question, with its full explanation.

ProgrammingC Programming PPSC FPSC NTSID: NWF-033

What is the output of this C code? int a = 5, b = 2; printf("%d", a / b);

  1. A2 ✓ Correct answer
  2. B2.5
  3. C3
  4. D0
ProgrammingC Programming PPSC FPSC NTSID: PROG-001

What is the output of this C code? printf("%d", 10 % 3);

  1. A0
  2. B3
  3. C3.33
  4. D1 ✓ Correct answer
ProgrammingC Programming PPSC FPSC NTSID: PROG-006

What is the output of this C code? printf("%d", 2 + 3 * 4);

  1. A20
  2. B9
  3. C24
  4. D14 ✓ Correct answer

Practise these MCQs interactively →

← Programming MCQs