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-034

What is the output of this C++ code? int x = 10; x += 5; cout << x;

  1. A15 ✓ Correct answer
  2. B10
  3. C5
  4. D50
ProgrammingC++ Programming PPSC FPSC NTSID: PROG-002

What is the output of this C++ code? int a = 7; int b = 2; cout << a - b;

  1. A3
  2. B9
  3. C14
  4. D5 ✓ Correct answer
ProgrammingC++ Programming PPSC FPSC NTSID: PROG-007

What is the output of this C++ code? int a = 4; int b = 3; cout << a * b;

  1. A1
  2. B7
  3. C12 ✓ Correct answer
  4. D43

Practise these MCQs interactively →

← Programming MCQs