9th Class Computer Science MCQs with Answers
These 9th class computer science MCQs with answers cover problem solving, the binary system and logic gates, computer networks, data and privacy, and designing a website with HTML. There are 100 original practice questions for Matric students, from flowcharts and binary conversion to topologies, ciphers and HTML tags. Use them for chapter revision or a quick test in the computer lab.
Round 1: Problem Solving · 20 questions
-
What is a step-by-step set of instructions to solve a problem called?
Easy- A compiler
- A network
- An algorithm
- A database
Answer: An algorithm
-
Which flowchart symbol is used for a decision?
Medium- Parallelogram
- Rectangle
- Diamond
- Oval
Answer: Diamond
-
What does the oval symbol show in a flowchart?
Medium- A decision
- A process
- Start or end
- Input or output
Answer: Start or end
-
What does the parallelogram symbol show in a flowchart?
Medium- Input or output
- A decision
- A process
- Start or end
Answer: Input or output
-
What is finding and fixing errors in a program called?
Easy- Debugging
- Encoding
- Compiling
- Formatting
Answer: Debugging
-
What is the first step in solving a problem?
Easy- Understanding the problem
- Printing the result
- Writing code
- Testing
Answer: Understanding the problem
-
What is a flowchart?
Easy- A list of computers
- A sales chart
- A diagram showing the steps of a solution
- A programming language
Answer: A diagram showing the steps of a solution
-
Which flowchart symbol shows a process or calculation?
Easy- Diamond
- Arrow
- Oval
- Rectangle
Answer: Rectangle
-
What is pseudocode?
Easy- A computer chip
- Steps written in plain, code-like language
- A finished program
- A virus
Answer: Steps written in plain, code-like language
-
What is a test case?
Medium- A set of inputs and expected outputs used to check a solution
- A box for storing disks
- A program error
- A flowchart symbol
Answer: A set of inputs and expected outputs used to check a solution
-
What is it called when a solution repeats steps?
Medium- Selection
- Iteration (a loop)
- Debugging
- Sequence
Answer: Iteration (a loop)
-
What is selection in an algorithm?
Medium- Stopping the program
- Running steps in order
- Choosing between steps depending on a condition
- Repeating steps
Answer: Choosing between steps depending on a condition
-
Which kind of error gives a wrong answer even though the program runs?
Medium- Hardware error
- Typing error
- Syntax error
- Logical error
Answer: Logical error
-
Starting from 4, an algorithm keeps adding 2 until it reaches 10. How many times does it add 2?
Medium- 4
- 2
- 5
- 3
Answer: 3
-
Which of these are features of a good algorithm?
Medium- It has clear steps
- It gives the right output
- It never ends
- It ends after a finite number of steps
Answer: It has clear steps, It gives the right output, It ends after a finite number of steps
-
Which of these are ways to write down an algorithm?
Medium- Flowchart
- A pie chart of sales
- Pseudocode
- Numbered plain-English steps
Answer: Flowchart, Pseudocode, Numbered plain-English steps
-
What is dry running an algorithm?
Hard- Deleting it
- Working through it by hand with test values
- Compiling it
- Running it without electricity
Answer: Working through it by hand with test values
-
What is decomposition in problem solving?
Hard- Throwing away bad code
- Converting to binary
- Breaking a problem into smaller parts
- Making a problem bigger
Answer: Breaking a problem into smaller parts
-
What is an infinite loop?
Hard- A loop with no steps
- A loop whose stopping condition is never met
- A loop that runs once
- A flowchart symbol
Answer: A loop whose stopping condition is never met
-
Which of these are types of program error?
Hard- Syntax errors
- Run-time errors
- Logical errors
- Colour errors
Answer: Syntax errors, Run-time errors, Logical errors
Round 2: Binary System and Logic Gates · 20 questions
-
What is the decimal number 5 in binary?
Easy- 100
- 101
- 111
- 110
Answer: 101
-
What is the binary number 1010 in decimal?
Easy- 10
- 8
- 12
- 1010
Answer: 10
-
How many bits make one byte?
Easy- 8
- 16
- 1024
- 4
Answer: 8
-
Which number system has base 16?
Medium- Binary
- Hexadecimal
- Decimal
- Octal
Answer: Hexadecimal
-
What is the output of an AND gate when its inputs are 1 and 0?
Medium- 2
- 0
- 10
- 1
Answer: 0
-
Which two digits are used in binary?
Easy- 0 and 1
- 1 and 10
- 1 and 2
- 0 and 9
Answer: 0 and 1
-
What is the decimal number 3 in binary?
Easy- 11
- 111
- 101
- 10
Answer: 11
-
What is the binary number 100 in decimal?
Easy- 4
- 2
- 100
- 8
Answer: 4
-
What is the output of a NOT gate when its input is 1?
Easy- It has no output
- 2
- 1
- 0
Answer: 0
-
What is the decimal number 13 in binary?
Medium- 1001
- 1110
- 1011
- 1101
Answer: 1101
-
What is 1 + 1 in binary?
Medium- 10
- 1
- 2
- 11
Answer: 10
-
How many different values can 4 bits represent?
Medium- 32
- 4
- 8
- 16
Answer: 16
-
What is the output of an OR gate when both inputs are 0?
Medium- 0
- 1
- Unknown
- 2
Answer: 0
-
What is the output of a NAND gate when both inputs are 1?
Medium- 0
- 1
- It depends on the clock
- 2
Answer: 0
-
Which of these are basic logic gates?
Medium- ADD
- AND
- NOT
- OR
Answer: AND, NOT, OR
-
Which of these binary numbers are even?
Medium- 110
- 111
- 1010
- 100
Answer: 110, 1010, 100
-
What is the binary number 11001 in decimal?
Hard- 25
- 21
- 27
- 19
Answer: 25
-
What is the 4-bit two's complement of 0101?
Hard- 1010
- 0110
- 1101
- 1011
Answer: 1011
-
What is the hexadecimal digit A in binary?
Hard- 1100
- 1001
- 1010
- 1011
Answer: 1010
-
Which pairs of inputs make an XOR gate output 1?
Hard- 1 and 0
- 0 and 0
- 1 and 1
- 0 and 1
Answer: 1 and 0, 0 and 1
Round 3: Networks · 20 questions
-
What is a network inside a single building called?
Easy- The internet
- MAN
- LAN
- WAN
Answer: LAN
-
Which device connects different networks and forwards data between them?
Easy- A router
- A keyboard
- A monitor
- A scanner
Answer: A router
-
What is the unique number given to a device on a network?
Medium- A URL
- An IP address
- An email address
- A PIN
Answer: An IP address
-
In which topology are all devices connected to a central hub or switch?
Medium- Mesh
- Star
- Ring
- Bus
Answer: Star
-
What is the largest wide area network in the world?
Easy- Bluetooth
- The internet
- A LAN
- An intranet
Answer: The internet
-
What is a computer network?
Easy- A printer
- Computers connected to share data and resources
- A type of virus
- A single computer
Answer: Computers connected to share data and resources
-
What does WAN stand for?
Easy- Wireless Access Node
- Wide Area Network
- Wide Access Name
- Web Area Network
Answer: Wide Area Network
-
Which device joins the computers in a LAN and sends data only to the right one?
Easy- Switch
- Monitor
- Scanner
- Speaker
Answer: Switch
-
What is Wi-Fi?
Easy- A cable
- A virus
- A search engine
- Wireless networking
Answer: Wireless networking
-
In which topology are computers connected one after another in a closed loop?
Medium- Bus
- Star
- Mesh
- Ring
Answer: Ring
-
In a bus topology, what are all the devices connected to?
Medium- A single main cable
- A central switch
- A satellite
- Every other device
Answer: A single main cable
-
Which cable carries data as pulses of light?
Medium- Twisted pair cable
- Fibre-optic cable
- Power cable
- Coaxial cable
Answer: Fibre-optic cable
-
What is a server?
Medium- A computer that provides services or data to other computers
- A web page
- A keyboard
- A network cable
Answer: A computer that provides services or data to other computers
-
What is a client-server network?
Medium- A network without cables
- Every computer is equal and there is no server
- Client computers get services from a central server
- A network of servers only
Answer: Client computers get services from a central server
-
Which of these are network topologies?
Medium- Star
- Circle-square
- Mesh
- Ring
Answer: Star, Mesh, Ring
-
Which of these are wired transmission media?
Medium- Radio waves
- Twisted pair cable
- Fibre-optic cable
- Coaxial cable
Answer: Twisted pair cable, Fibre-optic cable, Coaxial cable
-
What is a MAC address?
Hard- A unique hardware address of a network card
- A home address
- A website address
- An email address
Answer: A unique hardware address of a network card
-
How many bits are in an IPv4 address?
Hard- 128
- 16
- 64
- 32
Answer: 32
-
Which model describes network communication in seven layers?
Hard- The CPU model
- The TCP model only
- The RAM model
- The OSI model
Answer: The OSI model
-
Which of these are advantages of a network?
Hard- Communicating by email
- Computers never getting viruses
- Sharing printers
- Sharing files
Answer: Communicating by email, Sharing printers, Sharing files
Round 4: Data and Privacy · 20 questions
-
What is turning data into a secret code called?
Easy- Compression
- Encryption
- Formatting
- Decryption
Answer: Encryption
-
What is copying someone else's work without giving them credit called?
Easy- Encryption
- Plagiarism
- Spamming
- Hacking
Answer: Plagiarism
-
What is unwanted bulk email called?
Easy- A cookie
- A firewall
- A cache
- Spam
Answer: Spam
-
Which malware locks your files and demands payment?
Medium- Ransomware
- Spyware
- Adware
- Firmware
Answer: Ransomware
-
Which of these are good digital citizenship habits?
Easy- Sharing your password with friends
- Checking facts before sharing
- Being respectful to others online
- Posting other people's photos without asking
Answer: Checking facts before sharing, Being respectful to others online
-
What is data privacy?
Easy- Printing data
- Deleting all data
- Controlling who can see and use your personal information
- Making all data public
Answer: Controlling who can see and use your personal information
-
What is a backup?
Easy- A website
- A type of virus
- A broken file
- A copy of data kept safe in case the original is lost
Answer: A copy of data kept safe in case the original is lost
-
What is a computer virus?
Easy- A hardware part
- A network cable
- A spreadsheet
- A program that spreads and can damage files
Answer: A program that spreads and can damage files
-
What is decryption?
Easy- Copying data
- Turning coded data back into readable form
- Deleting data
- Turning data into code
Answer: Turning coded data back into readable form
-
What is a Caesar cipher?
Medium- A code that shifts each letter by a fixed number
- A network cable
- A type of virus
- A firewall
Answer: A code that shifts each letter by a fixed number
-
Using a Caesar cipher with a shift of 1, what does "CAT" become?
Medium- CAT
- DCU
- BZS
- DBU
Answer: DBU
-
What is a Trojan horse in computing?
Medium- A type of cable
- A backup
- Malware disguised as a useful program
- A strong password
Answer: Malware disguised as a useful program
-
What is an attack that floods a website with traffic to stop it working called?
Medium- Phishing
- Encryption
- Denial of service (DoS)
- Backup
Answer: Denial of service (DoS)
-
What is a digital certificate used for?
Medium- Storing photos
- Proving a website's identity
- Printing documents
- Speeding up Wi-Fi
Answer: Proving a website's identity
-
Which of these are kinds of malware?
Medium- Firewall
- Virus
- Spyware
- Worm
Answer: Virus, Spyware, Worm
-
Which of these are ethical uses of technology?
Medium- Respecting others' privacy
- Reporting cyberbullying
- Sharing someone's password
- Giving credit for others' work
Answer: Respecting others' privacy, Reporting cyberbullying, Giving credit for others' work
-
What is the main difference between a virus and a worm?
Hard- A worm spreads by itself across networks; a virus needs a host file
- They are exactly the same
- A virus is hardware
- A worm is antivirus software
Answer: A worm spreads by itself across networks; a virus needs a host file
-
In symmetric encryption, which key decrypts the message?
Hard- A public key only
- No key
- A different random key
- The same secret key that encrypted it
Answer: The same secret key that encrypted it
-
What is a brute-force attack?
Hard- A slow network
- A virus in an email
- Trying many passwords until one works
- Hitting a computer
Answer: Trying many passwords until one works
-
Which of these protect data?
Hard- Sharing passwords with friends
- Regular backups
- Strong passwords
- Encryption
Answer: Regular backups, Strong passwords, Encryption
Round 5: Designing a Website (HTML) · 20 questions
-
What does HTML stand for?
Easy- High Tech Modern Language
- HyperText Markup Language
- Hyperlink Text Making Language
- Home Tool Markup Language
Answer: HyperText Markup Language
-
Which tag makes the largest heading?
Easy- <head>
- <p>
- <h6>
- <h1>
Answer: <h1>
-
Which tag creates a paragraph?
Easy- <para>
- <text>
- <pg>
- <p>
Answer: <p>
-
Which tag creates a line break?
Easy- <lb>
- <br>
- <hr>
- <break>
Answer: <br>
-
Which program can you use to write HTML code?
Easy- A calculator
- Only a paint program
- A text editor such as Notepad
- A spreadsheet
Answer: A text editor such as Notepad
-
What file extension does an HTML file usually have?
Easy- .docx
- .jpg
- .exe
- .html
Answer: .html
-
Which tag creates a hyperlink?
Medium- <url>
- <link>
- <href>
- <a>
Answer: <a>
-
Which attribute holds the address in a link?
Medium- alt
- href
- src
- title
Answer: href
-
Which tag shows an image?
Medium- <pic>
- <src>
- <img>
- <image>
Answer: <img>
-
Which tag makes text bold?
Medium- <s>
- <u>
- <i>
- <b>
Answer: <b>
-
Which tag makes text italic?
Medium- <u>
- <i>
- <hr>
- <b>
Answer: <i>
-
Which tag starts a numbered (ordered) list?
Medium- <dl>
- <ol>
- <ul>
- <li>
Answer: <ol>
-
Which tag creates a row in a table?
Medium- <table>
- <th>
- <tr>
- <td>
Answer: <tr>
-
Which of these tags are used to build a table?
Medium- <table>
- <td>
- <ol>
- <tr>
Answer: <table>, <td>, <tr>
-
Which of these are list tags in HTML?
Medium- <ol>
- <ul>
- <br>
- <li>
Answer: <ol>, <ul>, <li>
-
What does the alt attribute of an image do?
Hard- Changes the image size
- Gives text shown if the image cannot load, and for screen readers
- Makes the image move
- Links to another page
Answer: Gives text shown if the image cannot load, and for screen readers
-
Which tag holds information about the page, such as its title, that is not shown in the page body?
Hard- <main>
- <footer>
- <head>
- <body>
Answer: <head>
-
Which attribute value opens a link in a new tab?
Hard- open="tab"
- target="_blank"
- rel="tab"
- href="new"
Answer: target="_blank"
-
What does CSS mainly control on a web page?
Hard- Its style and layout
- Its database
- Its server
- Its domain name
Answer: Its style and layout
-
Which of these are valid colour values in HTML and CSS?
Hard- #FF0000
- rgb(255, 0, 0)
- red
- colour-red
Answer: #FF0000, rgb(255, 0, 0), red
Questions people ask
Which topics do these computer science MCQs cover?
Problem solving, the binary system and logic gates, networks, data and privacy, and website design with HTML, with one round of 20 on each.
Are there binary conversion questions?
Yes. Several questions ask students to convert between binary and decimal, add in binary and work out logic gate outputs.
Can I run the test in the computer lab?
Yes. Students join with the quiz code in any browser, answer and submit, and you see every score.