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.

Q161. What does DBMS stand for?

  1. Data Backup Management System
  2. Database Memory System
  3. Digital Base Management System
  4. Database Management System
Show answer and explanation

Correct answer: D. Database Management System

A DBMS manages databases.

Q162. Which header file is needed for printf in C?

  1. stdio.h
  2. conio.h
  3. math.h
  4. string.h
Show answer and explanation

Correct answer: A. stdio.h

printf is declared in stdio.h.

Q163. What is encapsulation?

  1. Importing libraries
  2. Creating arrays
  3. Wrapping data and methods into a single unit
  4. Looping
Show answer and explanation

Correct answer: C. Wrapping data and methods into a single unit

Encapsulation bundles data with methods.

Q164. What is the extension of a Java source file?

  1. .py
  2. .cpp
  3. .js
  4. .java
Show answer and explanation

Correct answer: D. .java

Java source files end with .java.

Q165. In a flowchart, which shape represents a decision?

  1. Rectangle
  2. Oval
  3. Diamond
  4. Parallelogram
Show answer and explanation

Correct answer: C. Diamond

A diamond is used for decisions.

Q166. What does .pk represent as a domain?

  1. Pakistan
  2. Packet
  3. Peking
  4. Public
Show answer and explanation

Correct answer: A. Pakistan

.pk is the country-code domain for Pakistan.

Q167. What does a Trojan horse do?

  1. Repairs files
  2. Speeds up the computer
  3. Disguises itself as legitimate software
  4. Backs up data
Show answer and explanation

Correct answer: C. Disguises itself as legitimate software

A Trojan hides malicious code inside a useful-looking program.

Q168. What does .com stand for in a domain?

  1. Computer
  2. Commercial
  3. Community
  4. Company
Show answer and explanation

Correct answer: B. Commercial

.com originally meant commercial.

Q169. What is a variable?

  1. A function
  2. An error
  3. A type of loop
  4. A named storage location
Show answer and explanation

Correct answer: D. A named storage location

A variable stores a value.

Q170. What does HTTPS stand for?

  1. HyperText Transmission Protocol Secure
  2. HyperText Transport Process Secure
  3. High Transfer Protocol Secure
  4. HyperText Transfer Protocol Secure
Show answer and explanation

Correct answer: D. HyperText Transfer Protocol Secure

HTTPS uses TLS encryption.

Other subjects

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