Computer Science MCQs with Answers

Computer knowledge is tested in jobs ranging from clerical posts to IT positions. Practice MCQs on computer fundamentals, hardware, software, MS Office, networking, internet, databases and programming concepts, and see your score as soon as you finish.

Take a timed Computer Science quiz: Free account required to save your score.

Q211. Which loop is guaranteed to execute at least once?

  1. while
  2. for
  3. do-while
  4. foreach
Show answer and explanation

Correct answer: C. do-while

do-while checks the condition after the body.

Q212. How many bits are in an IPv6 address?

  1. 128
  2. 64
  3. 256
  4. 32
Show answer and explanation

Correct answer: A. 128

IPv6 addresses are 128 bits.

Q213. Which Excel function looks up a value in a row?

  1. HLOOKUP
  2. LOOKUPR
  3. VLOOKUP
  4. INDEX
Show answer and explanation

Correct answer: A. HLOOKUP

HLOOKUP searches the first row.

Q214. Which Excel function returns the smallest value?

  1. MIN
  2. LOW
  3. BOT
  4. SMALL
Show answer and explanation

Correct answer: A. MIN

MIN returns the smallest value.

Q215. Which device is used to scan documents?

  1. Modem
  2. Scanner
  3. Printer
  4. Speaker
Show answer and explanation

Correct answer: B. Scanner

A scanner digitises documents.

Q216. What is the extension of a C++ source file?

  1. .cpp
  2. .c
  3. .cs
  4. .cc only
Show answer and explanation

Correct answer: A. .cpp

.cpp is the common C++ extension.

Q217. Which shortcut key makes text bold?

  1. Ctrl + T
  2. Ctrl + I
  3. Ctrl + B
  4. Ctrl + U
Show answer and explanation

Correct answer: C. Ctrl + B

Ctrl+B makes bold.

Q218. What is the index of the first element in most programming languages?

  1. 0
  2. 2
  3. -1
  4. 1
Show answer and explanation

Correct answer: A. 0

Arrays are zero-indexed in C, Java and Python.

Q219. Which memory is fastest?

  1. Hard disk
  2. Cache memory
  3. RAM
  4. Optical disk
Show answer and explanation

Correct answer: B. Cache memory

Cache is the fastest memory near the CPU.

Q220. What is the function of an operating system?

  1. Only stores files
  2. Only displays graphics
  3. Manages hardware and software resources
  4. Only connects to Internet
Show answer and explanation

Correct answer: C. Manages hardware and software resources

The OS manages resources and provides services.

Computer Science MCQs by exam

Other subjects

Looking for a job? Apply while you prepare: browse the latest government and private jobs on PK JOBs Hub.