SS1 Second Term Computer Science Past Questions and Answers
SS1 Second Term Computer Science Past Questions and Answers
Question: What does the acronym HTTP stand for?
a) Hypertext Transfer Protocol
b) High-level Text Transmission Protocol
c) Hyperlink and Text Transfer Protocol
d) Hypertext and Textual Transmission Protocol
Answer: a) Hypertext Transfer Protocol
Question: Which of the following is not a primary color model used in digital images?
a) RGB
b) CMYK
c) HSV
d) YUV
Answer: d) YUV
Question: In object-oriented programming, what is encapsulation?
a) Combining different data types
b) Hiding the internal implementation details of an object
c) Creating multiple instances of a class
d) Sorting data in a specific order
Answer: b) Hiding the internal implementation details of an object
Question: Which of the following is an example of a web browser?
a) Java
b) Python
c) Firefox
d) SQL
Answer: c) Firefox
Question: What is the purpose of the “else” statement in programming?
a) To initialize variables
b) To handle errors
c) To define functions
d) To specify an alternative action when the “if” condition is false
Answer: d) To specify an alternative action when the “if” condition is false
Question: Which sorting algorithm has an average time complexity of O(n log n)?
a) Bubble Sort
b) Insertion Sort
c) Merge Sort
d) Selection Sort
Answer: c) Merge Sort
Question: What is the purpose of a database index?
a) To encrypt data
b) To improve search and retrieval speed
c) To create backups
d) To define data types
Answer: b) To improve search and retrieval speed
Question: Which of the following is an example of a volatile storage device?
a) Hard Disk Drive (HDD)
b) Solid State Drive (SSD)
c) USB Flash Drive
d) RAM
Answer: d) RAM
Question: What is the significance of the “404” HTTP status code?
a) Server error
b) Page not found
c) Successful request
d) Unauthorized access
Answer: b) Page not found
Question: In a network, what does IP address 127.0.0.1 commonly refer to?
a) Router address
b) Localhost or loopback address
c) Broadcast address
d) Subnet mask
Answer: b) Localhost or loopback address
Question: Which programming language is often used for developing mobile applications for Android devices?
a) Swift
b) Kotlin
c) Java
d) C#
Answer: b) Kotlin
Question: What is the purpose of the “break” statement in a loop?
a) To exit the program
b) To skip the current iteration and move to the next
c) To create a new loop
d) To print output
Answer: b) To skip the current iteration and move to the next
Question: Which file extension is commonly associated with executable files in Windows?
a) .exe
b) .dll
c) .zip
d) .txt
Answer: a) .exe
Question: What is the function of a router in a computer network?
a) Connects devices within the same local area network (LAN)
b) Filters and forwards data between networks
c) Stores and manages files
d) Provides internet access
Answer: b) Filters and forwards data between networks
Question: Which programming language is commonly used for game development?
a) Python
b) Java
c) C++
d) HTML
Answer: c) C++
Question: What is the purpose of a “try-catch” block in programming?
a) To declare variables
b) To handle exceptions and errors
c) To define functions
d) To create loops
Answer: b) To handle exceptions and errors
Question: In the context of cybersecurity, what is phishing?
a) A type of fishing
b) Sending malicious software via email
c) Attempting to deceive individuals to obtain sensitive information
d) A hardware component
Answer: c) Attempting to deceive individuals to obtain sensitive information
Question: Which of the following is a key characteristic of an object in object-oriented programming?
a) Inheritance
b) Looping
c) Switching
d) Pointer
Answer: a) Inheritance
Question: What is the purpose of the “AND” and “OR” operators in programming?
a) To perform addition and subtraction
b) To compare values
c) To combine conditional statements
d) To print output
Answer: c) To combine conditional statements
Question: Which protocol is c
ommonly used for secure communication over a computer network?
a) HTTP
b) FTP
c) HTTPS
d) SMTP
Answer: c) HTTPS