SS2 Third Term Computer Science Past Questions And Answers
SS2 third term Computer Science questions with options and answers:
Question: What is the purpose of a primary key in a relational database?
a) Sort data
b) Ensure data integrity
c) Create foreign keys
d) Perform calculations
Answer: b) Ensure data integrity
Question: Which type of testing evaluates the entire system as a whole?
a) Unit testing
b) Integration testing
c) System testing
d) Regression testing
Answer: c) System testing
Question: In web development, what does CSS stand for?
a) Computer Style Sheet
b) Cascading Style Sheet
c) Creative Style Selector
d) Centralized Style System
Answer: b) Cascading Style Sheet
Question: What is the purpose of the “finally” block in exception handling?
a) Define functions
b) Handle exceptions
c) Execute code regardless of exceptions
d) Perform mathematical operations
Answer: c) Execute code regardless of exceptions
Question: Which algorithm is commonly used for searching elements in a sorted array?
a) Bubble sort
b) Quick sort
c) Binary search
d) Merge sort
Answer: c) Binary search
Question: What is the purpose of a cache memory in a computer system?
a) Store permanent data
b) Speed up data access
c) Manage network connections
d) Display graphics
Answer: b) Speed up data access
Question: Which programming concept allows a class to inherit properties and behaviors from another class?
a) Encapsulation
b) Polymorphism
c) Inheritance
d) Abstraction
Answer: c) Inheritance
Question: What is the role of a version control system (VCS) in software development?
a) Manage data storage
b) Track changes in code
c) Execute code
d) Design user interfaces
Answer: b) Track changes in code
Question: Which HTTP method is used for retrieving data from a server?
a) GET
b) POST
c) PUT
d) DELETE
Answer: a) GET
Question: What is the purpose of the “this” keyword in object-oriented programming?
a) Refer to the current instance of a class
b) Specify data types
c) Control flow
d) Define constants
Answer: a) Refer to the current instance of a class
Question: Which type of attack aims to deceive users into providing sensitive information?
a) Phishing
b) DDoS
c) SQL injection
d) Cross-site scripting
Answer: a) Phishing
Question: What does API stand for in software development?
a) Advanced Programming Interface
b) Application Programming Interface
c) Automated Program Instruction
d) Associated Programming Interface
Answer: b) Application Programming Interface
Question: Which programming language is commonly used for data analysis and machine learning?
a) JavaScript
b) Python
c) C#
d) Ruby
Answer: b) Python
Question: What is the purpose of the “break” statement in loop control structures?
a) Exit the entire program
b) Skip the current iteration
c) Terminate the loop
d) Continue to the next iteration
Answer: c) Terminate the loop
Question: Which encryption algorithm is commonly used for secure communication over the internet?
a) AES
b) DES
c) RSA
d) MD5
Answer: a) AES
Question: What is the purpose of a content delivery network (CDN) in web development?
a) Manage databases
b) Accelerate content delivery
c) Create user interfaces
d) Handle user authentication
Answer: b) Accelerate content delivery
Question: In relational databases, what is a foreign key constraint used for?
a) Ensure data integrity
b) Sort data
c) Create indexes
d) Perform calculations
Answer: a) Ensure data integrity
Question: Which design pattern is used to ensure a single instance of a class and provide a global point of access to it?
a) Observer pattern
b) Singleton pattern
c) Factory pattern
d) Strategy pattern
Answer: b) Singleton pattern
Question: What is the purpose of the “await” keyword in asynchronous programming?
a) Define functions
b) Handle exceptions
c) Synchronize parallel tasks
d) Perform mathematical operations
Answer: c) Synchronize parallel tasks
Question: Which protocol is commonly used for email communication?
a) FTP
b) SMTP
c) HTTP
d) TCP
Answer: b) SMTP.