1. Home
  2. PDF downloads
  3. Computer Science MCQs PDF

Computer Science MCQs PDF Download

A free Computer Science MCQs PDF with 992 solved questions from every Computer Science topic. Useful for PPSC, FPSC, CSS, NTS and board exams: pick a topic, choose 25 to 500 questions and get the answer key at the end or under each question. Last updated 27 November 2026.

992 MCQs with answers Downloaded 7 times Updated 27 November 2026 English & اردو

Download Computer Science MCQs PDF

Number of questions
Answers
Practice online

Free, no sign-up. Sets with Urdu text open as a print-ready page: tap Save as PDF there.

Share with your study group

Preview: first 10 Computer Science MCQs

1. How many error levels are available in PHP 5?

  1. A. 14
  2. B. 15
  3. C. 16
  4. D. 17
Show answer

Correct answer: C – 16

See the explanation

2. What is the description of Error level E_ERROR?

  1. A. Fatal run-time error
  2. B. Near-fatal error
  3. C. Compile-time error
  4. D. Fatal Compile-time error
Show answer

Correct answer: A – Fatal run-time error

See the explanation

3. To create an object and set the date to JUNE 22, 2013, which one of the following statement should be executed?

  1. A. $date = Date(“22 JUNE 2013″)
  2. B. $date = new Date(“JUNE 22 2013″)
  3. C. $date = DateTime(“22 JUNE 2013″)
  4. D. $date = new DateTime(“22 JUNE 2013″)
Show answer

Correct answer: D – $date = new DateTime(“22 JUNE 2013″)

See the explanation

4. Which character do the error_reporting directive use to represent the logical operator NOT in PHP?

  1. A. /
  2. B. !
  3. C. ~
  4. D. ^
Show answer

Correct answer: C – ~

See the explanation

5. Say you want to report error concerned about fatal run-time, fatal compile-time error and core error which statement would you use?

  1. A. error_reporting = E_ALL
  2. B. error_reporting = E_ERROR | E_PARSE | E_CORE_ERROR
  3. C. error_reporting = E_ERROR | E_COMPILE_WARNING | E_CORE_ERROR
  4. D. error_reporting = E_ERROR | E_COMPILE_ERROR | E_CORE_ERROR
Show answer

Correct answer: D – error_reporting = E_ERROR | E_COMPILE_ERROR | E_CORE_ERROR

See the explanation

6. Which version introduced the function error_get_last()?

  1. A. PHP 4
  2. B. PHP 5
  3. C. HP 5.2
  4. D. PHP 5.3
Show answer

Correct answer: C – HP 5.2

See the explanation

7. Which of the following statements causes PHP to disregard repeated error messages that occur within the same file and on the same line?

  1. A. ignore_repeated_errors
  2. B. ignore_repeat_error
  3. C. repeatedly_ignore_error
  4. D. repeated_error_ignore
Show answer

Correct answer: A – ignore_repeated_errors

See the explanation

8. Which function initializes the constants necessary for using the openlog(), clodelog(), and syslog() functions?

  1. A. define_variable()
  2. B. define_log_variable()
  3. C. log_variable()
  4. D. define_syslog_variable()
Show answer

Correct answer: D – define_syslog_variable()

See the explanation

9. Which logging option’s description is, if an error occurs when writing to the syslog, send output to the system console?

  1. A. LOG_CONS
  2. B. LOG_NDELAY
  3. C. LOG_ODELAY
  4. D. LOG_PERROR
Show answer

Correct answer: A – LOG_CONS

See the explanation

10. Which function is responsible for sending a custom message to the system log?

  1. A. systemlog()
  2. B. syslog()
  3. C. log_system()
  4. D. sys_log()
Show answer

Correct answer: B – syslog()

See the explanation

Topic-wise Computer Science PDFs

Computer Science MCQs PDF by exam

Other subjects

Computer Science MCQs PDF – FAQ

Is the Computer Science MCQs PDF free?

Yes. The Computer Science MCQs PDF is completely free. You do not need an account; just choose how many questions you want and press Download PDF.

How many questions are in the Computer Science MCQs PDF?

There are 992 Computer Science MCQs with answers. PDFs are made topic by topic: pick a topic and download 25, 50, 75, 100, 200, 300 or up to 500 questions in one file.

Does the PDF include the answers?

Yes. Choose "Answer key at the end" for a self-test sheet, or "Answer under each question" for quick revision. The online version also explains each answer.

Can I practise Computer Science MCQs online?

Yes. Press Practice online to answer the same questions on MCQsExam, see explanations, and take a timed test with a free certificate.

Is the Computer Science PDF updated?

The PDF is rebuilt automatically whenever new Computer Science MCQs are added or corrected. It was last updated on 27 November 2026.