FPSC Past Papers MCQs

FPSC Programmer (BS 17) PMD High Yield 2026  — 350 MCQs  (Page 5 of 35)

Practice FPSC Past Papers MCQs with solved questions from real past exams. These MCQs cover FPSC Programmer (BS 17) PMD High Yield 2026 past papers and are ideal for candidates preparing for competitive exams.

View Tests (30 MCQs each)
What does Python's 0.1 + 0.2 == 0.3 evaluate to?
  • True
  • TypeError
  • It depends on the operating system
  • False
How are the 64 bits of an IEEE 754 double-precision number divided?
  • 1 sign bit, 15 exponent bits, 48 fraction bits
  • 1 sign bit, 11 exponent bits, 52 fraction bits
  • 1 sign bit, 8 exponent bits, 55 fraction bits
  • 2 sign bits, 10 exponent bits, 52 fraction bits
In Python, what does 1.0 / 0.0 produce?
  • ZeroDivisionError
  • 0.0
  • nan
  • inf
What are round(2.5) and round(0.5) in Python 3?
  • 2 and 1
  • 3 and 1
  • 2 and 0
  • 3 and 0
What is int(-3.7) in Python?
  • -4
  • -3.7
  • -3
  • ValueError
In C++11, what happens with int x{3.5};?
  • Compilation error (narrowing conversion)
  • x = 3
  • x = 4
  • A warning only, and x = 3
In JavaScript, what are "5" + 2 and "5" - 2?
  • 7 and "3"
  • 7 and 3
  • "52" and 3
  • "52" and "3"
In C, how many bytes does the string literal "hello" occupy, and what does strlen return for it?
  • sizeof is 6; strlen is 5
  • sizeof is 5; strlen is 6
  • Both are 5
  • Both are 6