Past Questions and Answers

SS3 Second Term Computer Science Past Questions And Answers

Sponsored Links

SS3 Second Term Computer Science Past Questions And Answers

Whether you’re a coding enthusiast or a student on the quest for knowledge, these questions will challenge your understanding and expand your horizons in the world of computer science. Let’s dive in and see if you can conquer this set!

 

21. What is the purpose of the ‘super’ keyword in object-oriented programming?

a) It refers to the superclass in a class hierarchy

b) It is used to invoke the parent class’s methods and properties

c) It is a reserved keyword for defining class attributes

d) It initializes the subclass

 

Answer: b) It is used to invoke the parent class’s methods and properties

 

22. In the context of databases, what is normalization?

a) A process to minimize data redundancy and dependency by organizing fields and table of a database

b) A technique to encrypt sensitive information

c) A method for compressing data to save storage space

d) A procedure for creating backup copies of a database

 

Answer: a) A process to minimize data redundancy and dependency by organizing fields and table of a database

 

23. What does the acronym HTTP stand for in web development?

a) HyperText Transfer Protocol

b) HyperText Transmission Protocol

c) High-Level Text Protocol

d) HyperTransfer Text Protocol

 

Answer: a) HyperText Transfer Protocol

 

24. Which data structure is suitable for implementing a LRU (Least Recently Used) cache?

a) Queue

b) Stack

c) Linked List

d) Array

 

Answer: c) Linked List

 

25. What is the purpose of the ‘try’ block in exception handling?

a) It is where the code that might raise an exception is placed

b) It is always executed, regardless of whether an exception occurs or not

c) It is executed when an exception occurs

d) It is where the ‘finally’ block is defined

 

Answer: a) It is where the code that might raise an exception is placed

 

26. In computer networks, what does the term ‘IP address’ stand for?

a) Internet Protocol address

b) Intranet Point address

c) Internal Protocol address

d) Internet Point address

 

Answer: a) Internet Protocol address

 

27. What is the purpose of the ‘assert’ statement in programming?

a) To terminate the program

b) To check if a condition is true and trigger an error if it’s not

c) To print a debug message

d) To skip the current iteration of a loop

 

Answer: b) To check if a condition is true and trigger an error if it’s not

 

28. Which algorithm is commonly used for searching elements in a sorted array?

a) Linear Search

b) Binary Search

c) QuickSort

d) Bubble Sort

 

Answer: b) Binary Search

 

29. What is the purpose of the ‘chmod’ command in Unix/Linux?

a) To change the mode of a file or directory

b) To compress files into an archive

c) To copy files from one directory to another

d) To delete a directory

 

Answer: a) To change the mode of a file or directory

 

30. What is the significance of the ‘volatile’ keyword in programming languages like Java?

a) It indicates that a variable’s value may be changed by multiple threads simultaneously

b) It defines a constant variable

c) It is used for declaring global variables

d) It is a data type specifier

 

Answer: a) It indicates that a variable’s value may be changed by multiple threads simultaneously

 

31. In cybersecurity, what does the term ‘encryption’ involve?

a) Creating a duplicate of data for security purposes

b) Encoding information to prevent unauthorized access

c) Analyzing network traffic patterns

d) Detecting and removing viruses

 

Answer: b) Encoding information to prevent unauthorized access

 

32. What is the primary role of a compiler in the context of programming languages?

a) To execute code line by line

b) To convert high-level source code into machine code

c) To manage memory allocation

d) To optimize code for faster execution

 

Answer: b) To convert high-level source code into machine code

 

33. Which of the following is an advantage of using linked lists over arrays?

a) Constant-time access to elements

b) Contiguous memory allocation

c) Dynamic size

d) Efficient for random access

 

Answer: c) Dynamic size

 

34. What is the purpose of the ‘SQL JOIN’ clause in database queries?

a) To filter records based on a specified condition

b) To combine rows from two or more tables based on a related column

c) To create a new table in the database

d) To sort records in ascending order

 

Answer: b) To combine rows from two or more tables based on a related column

 

35. Which data structure is used in depth-first search (DFS) algorithm?

a) Queue

b) Stack

c) Heap

d) Linked List

 

Answer: b) Stack

 

36. What is the primary function of an interpreter in programming languages?

a) To translate source code into machine code

b) To optimize code for faster execution

c) To execute code line by line without prior compilation

d) To convert high-level source code into assembly language

 

Answer: c) To execute code line by line without prior compilation

 

37. In the context of databases, what is a ‘primary key’?

a) A unique identifier for each row in a table

b) A key used for encrypting sensitive data

c) A column that stores binary data

d) A special type of index

 

Answer: a) A unique identifier for each row in a table

 

38. Which of the following is NOT a type of cloud computing service model?

a) Infrastructure as a Service (IaaS)

b) Platform as a Service (PaaS)

c) Software as a Service (SaaS)

d) Local Area Network as a Service (LANaaS)

 

Answer: d) Local Area Network as a Service (LANaaS)

Sponsored Links

Leave a Reply

Back to top button