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.

Q201. Which keyword is used to define a function in Python?

  1. define
  2. def
  3. function
  4. func
Show answer and explanation

Correct answer: B. def

def begins a function definition.

Q202. What is phishing?

  1. A programming technique
  2. A search algorithm
  3. Fraudulent attempt to steal sensitive information
  4. A type of fishing software
Show answer and explanation

Correct answer: C. Fraudulent attempt to steal sensitive information

Phishing tricks users into revealing credentials.

Q203. Who developed Java?

  1. Guido van Rossum
  2. Dennis Ritchie
  3. Bjarne Stroustrup
  4. James Gosling
Show answer and explanation

Correct answer: D. James Gosling

Gosling created Java at Sun Microsystems.

Q204. What is a pointer in C?

  1. A loop
  2. A function
  3. A comment
  4. A variable that stores a memory address
Show answer and explanation

Correct answer: D. A variable that stores a memory address

Pointers hold addresses.

Q205. What is a computer virus?

  1. A search engine
  2. A web browser
  3. A hardware part
  4. A program that spreads by attaching to other files
Show answer and explanation

Correct answer: D. A program that spreads by attaching to other files

Viruses replicate and spread.

Q206. Which of the following is a NoSQL database?

  1. MongoDB
  2. Oracle
  3. PostgreSQL
  4. MySQL
Show answer and explanation

Correct answer: A. MongoDB

MongoDB is a document NoSQL database.

Q207. Which key removes the character to the right of the cursor?

  1. Delete
  2. Backspace
  3. Home
  4. End
Show answer and explanation

Correct answer: A. Delete

Delete removes to the right.

Q208. What is the output of 5 + 3 * 2 in most programming languages?

  1. 13
  2. 10
  3. 16
  4. 11
Show answer and explanation

Correct answer: D. 11

Multiplication has higher precedence.

Q209. What is a folder?

  1. A device
  2. A program
  3. A type of file
  4. A container for files
Show answer and explanation

Correct answer: D. A container for files

Folders organise files.

Q210. Which device connects multiple networks and forwards packets?

  1. Hub
  2. Router
  3. Switch
  4. Repeater
Show answer and explanation

Correct answer: B. Router

A router connects networks.

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.