This is just a sample. This page shows only 15 of our 155 computer science questions. To see all of them, plus 300+ full mock papers, for free, visit All tests and make a free account.
These computer science MCQs cover the ICS syllabus: computer basics, number systems, logic gates, programming ideas, data structures, sorting, networks, databases and operating systems.
This topic comes in USAT-CS. Below are 15 questions from our own bank of 155 computer science questions (8 easy, 7 medium, 0 hard). They are written by our team to match the HEC pattern, not copied from past papers.
How to use these questions
- Practice binary, octal and hex changes until they are easy. They come in almost every paper.
- Learn the truth tables of AND, OR, NOT, NAND, NOR and XOR.
- Know the time complexity of common sorting and searching methods.
Want the full topic? Read our Computer science topics for USAT-CS.
Computer Science practice questions
-
1. The worst-case time complexity of bubble sort is:
Show answer
Answer: D. O(n²)
In the worst case (reverse order), bubble sort makes about n²/2 comparisons: O(n²).
-
2. Which shortcut key undoes the last action in most programs?
Show answer
Answer: B. Ctrl + Z
Ctrl + Z undoes the last action. Ctrl + Y usually redoes it.
-
3. The purpose of an operating system is to:
Show answer
Answer: B. Manage hardware resources and provide services to programs
An OS (Windows, Linux, macOS) manages CPU scheduling, memory, file systems, and I/O, acting as an interface between hardware and software.
-
4. Which shortcut key is used to copy selected text in Windows?
Show answer
Answer: B. Ctrl + C
Ctrl + C copies, Ctrl + V pastes, Ctrl + X cuts and Ctrl + Z undoes.
-
5. Which of these is an open-source operating system?
Show answer
Answer: B. Linux
Linux is open source: anyone can see, change and share its code.
-
6. What is printed by this Python code? print(10 // 3)
Show answer
Answer: C. 3
In Python, // is floor division. It drops the decimal part: 10 // 3 = 3.
-
7. A device that changes digital signals into analogue signals (and back) so computers can use telephone lines is a:
Show answer
Answer: D. modem
Modem = MOdulator-DEModulator. It changes digital data to analogue signals and back.
-
8. IP address 192.168.x.x is a:
Show answer
Answer: C. Private (local) IP address
192.168.0.0/16 is a private address range (RFC 1918) used within local networks, not routable on the public internet.
-
9. Normalisation in database design aims to:
Show answer
Answer: D. reduce data redundancy and improve data integrity
Normalisation (1NF, 2NF, 3NF…) splits data into related tables to remove duplication and update anomalies.
-
10. Encryption is used to:
Show answer
Answer: A. Protect data by converting it into an unreadable form
Encryption transforms plaintext into ciphertext using a key. Only those with the correct key can decrypt it.
-
11. An IPv4 address is how many bits long?
Show answer
Answer: B. 32
An IPv4 address is 32 bits, written as four 8-bit octets (e.g. 192.168.1.1). IPv6 uses 128 bits.
-
12. What does CPU stand for?
Show answer
Answer: A. Central Processing Unit
The CPU is the brain of the computer, executing instructions. It consists of the control unit (CU) and arithmetic logic unit (ALU).
-
13. Storing files and using software over the internet instead of on your own computer is called:
Show answer
Answer: D. cloud computing
Cloud computing uses servers on the internet, e.g. Google Drive, to store and run things.
-
14. Buying and selling goods over the internet is called:
Show answer
Answer: D. e-commerce
E-commerce means electronic commerce: shopping and trading online.
-
15. 1 gigabyte (GB) is equal to:
Show answer
Answer: A. 1024 megabytes
1 GB = 1024 MB, 1 MB = 1024 KB, 1 KB = 1024 bytes.