SPSC Computer Science Past Papers mcqs pdf

Blog

SPSC Computer Science Past Papers mcqs pdf online practice tests. SPSC lecturer computer science mcqs mock tests.


In the context of databases, ACID stands for:

a. Automatic Concurrency Isolation and Durability

b. Atomicity Consistency Isolation and Durability

c. Atomicity Concurrency Isolation and Durability

d. Atomicity Consistency Integrity and Durability


Answer: d. Atomicity Consistency Integrity and Durability


Which algorithm is used to find the shortest path in a weighted graph?

a. Depth-First Search (DFS)

b. Breadth-First Search (BFS)

c. Dijkstra’s algorithm

d. Prim’s algorithm


Answer: c. Dijkstra’s algorithm


Which programming paradigm focuses on breaking down a problem into smaller reusable modules?

a. Object-Oriented Programming (OOP)

b. Procedural Programming

c. Functional Programming

d. Structured Programming


Answer: a. Object-Oriented Programming (OOP)


Which of the following sorting algorithms has a worst-case time complexity of O(n log n)?

a. Bubble Sort

b. Insertion Sort

c. Selection Sort

d. Merge Sort


Answer: d. Merge Sort


Which of the following data structures is best suited for implementing a priority queue?

a. Array

b. Linked List

c. Stack

d. Heap


Answer: d. Heap


Which encryption algorithm is commonly used for secure communication over the internet?

a. RSA

b. DES

c. AES

d. MD5


Answer: c. AES


Which data structure is typically used to implement a symbol table in a compiler?

a. Array

b. Linked List

c. Hash Table

d. Tree


Answer: c. Hash Table


Which design pattern focuses on providing a way to create objects without directly instantiating their classes?

a. Factory Pattern

b. Singleton Pattern

c. Prototype Pattern

d. Abstract Factory Pattern


Answer: a. Factory Pattern


Which of the following is an example of a dynamic programming problem?

a. Towers of Hanoi

b. Fibonacci sequence

c. Binary search

d. Depth-First Search (DFS)


Answer: b. Fibonacci sequence


In the context of operating systems, which scheduling algorithm provides fairness by assigning a fixed time slice to each process in a round-robin manner?

a. First-Come, First-Served (FCFS)

b. Shortest Job Next (SJN)

c. Round Robin (RR)

d. Priority Scheduling


Answer: c. Round Robin (RR)


Which data structure is used to efficiently implement a breadth-first search in a graph?

a. Stack

b. Queue

c. Tree

d. Hash Table


Answer: b. Queue


Which of the following algorithms is used for finding the strongly connected components in a directed graph?

a. Dijkstra’s algorithm

b. Kruskal’s algorithm

c. Prim’s algorithm

d. Tarjan’s algorithm


Answer: d. Tarjan’s algorithm


In the context of databases, which of the following normal forms eliminates transitive functional dependencies?

a. First Normal Form (1NF)

b. Second Normal Form (2NF)

c. Third Normal Form (3NF)

d. Boyce-Codd Normal Form (BCNF)


Answer: c. Third Normal Form (3NF)


Which of the following sorting algorithms has a time complexity of O(n^2) in the worst case?

a. Quick Sort

b. Heap Sort

c. Merge Sort

d. Insertion Sort


Answer: d. Insertion Sort


In object-oriented programming, what is the process of creating an object from a class called?

a. Inheritance

b. Encapsulation

c. Polymorphism

d. Instantiation


Answer: d. Instantiation


Which encryption algorithm is commonly used for secure communication over the internet and is based on the Diffie-Hellman key exchange?

a. RSA

b. DES

c. AES

d. SSL/TLS


Answer: d. SSL/TLS


Which data structure is typically used to implement a LIFO (Last-In, First-Out) behavior?

a. Stack

b. Queue

c. Linked List

d. Tree


Answer: a. Stack


Which design pattern promotes loose coupling between objects by allowing a subject to notify multiple observers of its state changes?

a. Observer Pattern

b. Decorator Pattern

c. Adapter Pattern

d. Strategy Pattern


Answer: a. Observer Pattern

Leave a Reply

Your email address will not be published. Required fields are marked *