IT Jobs Computer Science MCQs with Answers

179 practice MCQs on Computer Science for IT Jobs tests. Think of your answer first, then open "Show answer and explanation". These are practice questions, not official examination papers.

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

Q151. Which command in Windows lists files in a directory?

  1. show
  2. ls
  3. dir
  4. list
Show answer and explanation

Correct answer: C. dir

dir lists directory contents in Windows CMD.

Q152. What is the time complexity of binary search?

  1. O(1)
  2. O(n^2)
  3. O(log n)
  4. O(n)
Show answer and explanation

Correct answer: C. O(log n)

Binary search halves the range each step.

Q153. Which of the following is a relational database?

  1. Neo4j
  2. MySQL
  3. Redis
  4. MongoDB
Show answer and explanation

Correct answer: B. MySQL

MySQL is relational.

Q154. Which SQL JOIN returns only matching rows from both tables?

  1. CROSS JOIN
  2. INNER JOIN
  3. LEFT JOIN
  4. FULL JOIN
Show answer and explanation

Correct answer: B. INNER JOIN

INNER JOIN returns matches.

Q155. Which unit is used to measure CPU clock speed?

  1. Hertz (GHz)
  2. Watt
  3. Pixel
  4. Byte
Show answer and explanation

Correct answer: A. Hertz (GHz)

Clock speed is measured in hertz.

Q156. What does FTP stand for?

  1. File Transport Process
  2. Fast Transfer Protocol
  3. File Transfer Protocol
  4. File Transmission Program
Show answer and explanation

Correct answer: C. File Transfer Protocol

FTP transfers files.

Q157. What is a primary key?

  1. A unique identifier for each record
  2. A null value
  3. A duplicate value
  4. A foreign column
Show answer and explanation

Correct answer: A. A unique identifier for each record

A primary key uniquely identifies a row.

Q158. Which generation of computers used integrated circuits?

  1. First generation
  2. Fifth generation
  3. Second generation
  4. Third generation
Show answer and explanation

Correct answer: D. Third generation

Third generation used ICs.

Q159. What does CSS stand for?

  1. Creative Style System
  2. Computer Style Sheets
  3. Cascading Style Sheets
  4. Cascading Script Sheets
Show answer and explanation

Correct answer: C. Cascading Style Sheets

CSS styles web pages.

Q160. Which command in Linux lists files in a directory?

  1. dir
  2. list
  3. show
  4. ls
Show answer and explanation

Correct answer: D. ls

ls lists directory contents.

Other subjects

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