Font size
S
M
L
XL
WorksheetsCS/IT Questions
Total questions: 91
Worksheet time: 46mins
Name
Class
Date
1.
What is the time complexity of inserting a node at the beginning of a singly linked list?
a)
O(1)
b)
O(n)
c)
O(log n)
d)
O(n²)
2.
Which data structure uses LIFO (Last-In-First-Out) principle?
a)
Queue
b)
Stack
c)
Heap
d)
Graph
3.
What is the worst-case time complexity of QuickSort?
a)
O(n log n)
b)
O(n²)
c)
O(n)
d)
O(log n)
4.
Which protocol is used for secure communication over a network?
a)
HTTP
b)
HTTPS
c)
FTP
d)
DNS
5.
What does ACID stand for in databases?
a)
Atomicity, Consistency, Isolation, Durability
b)
Availability, Consistency, Integrity, Durability
c)
Atomicity, Concurrency, Isolation, Durability
6.
Which layer of the OSI model handles routing and IP addressing?
a)
Transport Layer
b)
Network Layer
c)
Data Link Layer
d)
Application Layer
7.
What is a primary use case for a B-tree?
a)
Storing hierarchical data
b)
Database indexing
c)
Graph traversal
d)
Sorting algorithms
8.
Which sorting algorithm has a worst-case time complexity of O(n log n)?
a)
Bubble Sort
b)
Merge Sort
c)
Quick Sort
d)
Insertion Sort
9.
What is the purpose of a semaphore in operating systems?
a)
Manage file systems
b)
Synchronize threads
c)
Allocate memory
d)
Handle interrupts
10.
Which normal form eliminates transitive dependencies in a database?
a)
1NF
b)
2NF
c)
3NF
d)
BCNF
11.
What is the default port number for HTTP?
a)
80
b)
443
c)
22
d)
3306
12.
Which language is statically typed?
a)
Python
b)
JavaScript
c)
Java
d)
Ruby
13.
What does DNS stand for?
a)
Domain Name System
b)
Dynamic Network Service
c)
Data Naming Structure
14.
Which algorithm uses divide-and-conquer strategy?
a)
Bubble Sort
b)
Quick Sort
c)
Linear Search
d)
Depth-First Search
15.
What is encapsulation in OOP?
a)
Hiding internal state and requiring interactions through methods
b)
Inheriting properties from a parent class
c)
Creating multiple instances of a class
16.
What is the purpose of an index in a database?
a)
Enforce data integrity
b)
Improve query performance
c)
Backup data
d)
Encrypt data
17.
Which data structure is used for implementing recursion?
a)
Queue
b)
Stack
c)
Tree
d)
Hash Table
18.
What is a deadlock?
a)
A thread termination process
b)
Unpredictable behavior due to concurrent access
c)
Two or more threads waiting indefinitely for resources
19.
What is the subnet mask for a /24 IPv4 network?
a)
255.255.255.0
b)
255.255.0.0
c)
255.0.0.0
d)
255.255.255.255
20.
Which HTTP method is used to submit data to a server?
a)
GET
b)
POST
c)
PUT
d)
DELETE
21.
What is polymorphism in OOP?
a)
A class with no instances
b)
Ability of an object to take many forms
c)
Restricting access to class members
22.
Which encryption algorithm is asymmetric?
a)
AES
b)
RSA
c)
3DES
d)
Blowfish
23.
What is the purpose of garbage collection?
a)
Manage network traffic
b)
Free unused memory
c)
Compile code
d)
Encrypt data
24.
Which data structure is used for breadth-first search?
a)
Stack
b)
Queue
c)
Heap
d)
Tree
25.
What does the SOLID principle in OOP emphasize?
a)
Software scalability and maintainability
b)
Database normalization
c)
Network security
26.
Which database is ACID-compliant?
a)
MongoDB
b)
Cassandra
c)
PostgreSQL
d)
Redis
27.
What is a microservices architecture?
a)
A single monolithic application
b)
Loosely coupled, independently deployable services
c)
A type of database sharding
28.
Which algorithm guarantees mutual exclusion in distributed systems?
a)
Dijkstra’s Algorithm
b)
Raft Consensus
c)
MapReduce
d)
Round-Robin
29.
What is the role of a load balancer?
a)
Encrypt data
b)
Distribute network traffic across servers
c)
Manage database queries
30.
Which protocol is connection-oriented?
a)
UDP
b)
TCP
c)
ICMP
d)
HTTP
31.
What is the Big-O complexity of binary search?
a)
O(1)
b)
O(n)
c)
O(log n)
d)
O(n²)
32.
Which language uses pointers extensively?
a)
Python
b)
Java
c)
C++
d)
Ruby
33.
What is the purpose of the 'volatile' keyword in Java?
a)
Ensure thread safety
b)
Mark a variable as constant
c)
Improve garbage collection
34.
Which data structure allows O(1) average-time complexity for insertions and deletions?
a)
Linked List
b)
Hash Table
c)
Binary Search Tree
d)
Stack
35.
What is the CAP theorem?
a)
Consistency, Availability, Partition Tolerance
b)
Concurrency, Atomicity, Persistence
36.
Which normal form requires eliminating repeating groups?
a)
1NF
b)
2NF
c)
3NF
d)
BCNF
37.
What is the purpose of the 'finally' block in exception handling?
a)
To handle exceptions
b)
To execute code regardless of whether an exception is thrown
c)
To catch specific exceptions
38.
Which design pattern ensures only one instance of a class exists?
a)
Factory Pattern
b)
Singleton Pattern
c)
Observer Pattern
39.
What is the role of a reverse proxy?
a)
Encrypt data
b)
Distribute incoming requests to backend servers
c)
Manage database connections
40.
What is the difference between TCP and UDP?
a)
TCP is connection-oriented, UDP is connectionless
b)
TCP is faster, UDP is more reliable
c)
TCP is used for video streaming, UDP for file transfers
41.
Explain the concept of memoization.
a)
Optimizing code by removing redundant calculations
b)
Storing results of expensive function calls to reuse them
c)
Converting code into machine language
42.
What is a race condition?
a)
A condition where threads execute sequentially
b)
Unpredictable behavior due to concurrent access to shared data
c)
A type of deadlock
43.
What is the difference between a process and a thread?
a)
A process is a single execution sequence, a thread is a lightweight process
b)
Threads share memory space, processes have separate memory
c)
Both A and B
44.
Which data structure is used for implementing an LRU cache?
a)
Linked List
b)
Hash Map and Doubly Linked List
c)
Binary Heap
45.
What is the role of a foreign key in a database?
a)
Uniquely identify a record in a table
b)
Link two tables by referencing a primary key in another table
c)
Ensure data integrity constraints
46.
What is the difference between SQL and NoSQL databases?
a)
SQL is relational, NoSQL is non-relational
b)
SQL uses JSON, NoSQL uses tables
c)
SQL is faster for read operations
47.
Explain the concept of virtualization.
a)
Running multiple operating systems on a single physical machine
b)
Converting physical servers to cloud instances
c)
Encrypting virtual memory
48.
What is the purpose of an API gateway in microservices?
a)
To manage database connections
b)
To route requests, aggregate responses, and handle cross-cutting concerns
c)
To encrypt API endpoints
49.
What is the difference between authentication and authorization?
a)
Authentication verifies identity, authorization grants permissions
b)
Authentication encrypts data, authorization decrypts data
c)
Both are the same
50.
What is a stored procedure in a database?
a)
A precompiled collection of SQL statements
b)
A backup of the database
c)
A type of index
51.
Explain the concept of dependency injection.
a)
Passing dependencies to a class rather than creating them internally
b)
Injecting code into a running process
c)
A type of database injection attack
52.
What is the use of the 'volatile' keyword in Java?
a)
To indicate that a variable may change asynchronously
b)
To mark a variable as constant
c)
To improve garbage collection
53.
What is the difference between HTTP/1.1 and HTTP/2?
a)
HTTP/2 uses multiplexing, HTTP/1.1 does not
b)
HTTP/1.1 is faster than HTTP/2
c)
HTTP/2 is stateless, HTTP/1.1 is stateful
54.
What is the purpose of a CDN?
a)
To distribute content geographically closer to users
b)
To manage database sharding
c)
To encrypt web traffic
55.
Explain the concept of sharding in databases.
a)
Partitioning data across multiple machines
b)
Creating backups of the database
c)
Indexing tables for faster queries
56.
What is the difference between symmetric and asymmetric encryption?
a)
Symmetric uses a single key, asymmetric uses a key pair
b)
Asymmetric is faster than symmetric
c)
Symmetric is used for digital signatures
57.
What is the primary purpose of a syntax tree in compiler design?
a)
Tokenize source code
b)
Optimize memory usage
c)
Represent hierarchical structure of the parsed code
58.
Which algorithm is used to achieve consensus in distributed systems?
a)
Paxos
b)
Dijkstra’s Algorithm
c)
MapReduce
59.
What does IaaS stand for in cloud computing?
a)
Infrastructure as a Service
b)
Internet as a Service
c)
Integrated Application System
60.
What is overfitting in machine learning?
a)
Model performs well on training data but poorly on test data
b)
Model is too simple to capture patterns
61.
Which attack involves injecting malicious SQL queries?
a)
SQL Injection
b)
Cross-Site Scripting (XSS)
c)
DDoS Attack
62.
What is the first phase of the Software Development Life Cycle (SDLC)?
a)
Requirement Gathering
b)
Testing
c)
Deployment
63.
What is a cache hit?
a)
Data is found in the cache
b)
Data is fetched from main memory
c)
Cache is invalidated
64.
What does REST stand for in web development?
a)
Representational State Transfer
b)
Remote Service Transfer
c)
Resource Endpoint Syntax Tree
65.
What is virtual memory?
a)
Extending RAM using disk space
b)
A type of GPU memory
c)
Non-volatile storage
66.
What is the difference between a compiler and an interpreter?
a)
Compiler translates code all at once; Interpreter executes line-by-line
b)
Interpreter translates code all at once; Compiler executes line-by-line
67.
Which protocol is stateless and uses methods like GET and POST?
a)
HTTP
b)
FTP
c)
TCP
68.
What is the purpose of the Bellman-Ford algorithm?
a)
Find shortest paths in graphs with negative weights
b)
Sort arrays efficiently
c)
Encrypt data
69.
What is a dangling pointer?
a)
Pointer pointing to deallocated memory
b)
Pointer with a null value
c)
Pointer to a static variable
70.
Which sorting algorithm is adaptive and stable?
a)
Insertion Sort
b)
Quick Sort
c)
Heap Sort
71.
What is the role of the 'this' keyword in Java?
a)
Refer to the current class instance
b)
Create a new object
c)
Declare a static method
72.
Which data structure is used for recursion stack management?
a)
Heap
b)
Queue
c)
Stack
73.
What is a Turing machine used to model?
a)
General computation
b)
Database transactions
c)
Network routing
74.
What is the purpose of the IEEE 802.11 standard?
a)
Define Wi-Fi protocols
b)
Regulate Ethernet cables
c)
Standardize Bluetooth
75.
Which type of testing focuses on individual code modules?
a)
Unit Testing
b)
Integration Testing
c)
System Testing
76.
What is the output of a lexical analyzer?
a)
Tokens
b)
Abstract Syntax Tree
c)
Optimized Code
77.
What is the primary purpose of a Bloom filter?
a)
Encrypt data
b)
Test whether an element is a member of a set
c)
Sort large datasets
78.
Which protocol is used for email transmission?
a)
HTTP
b)
SMTP
c)
FTP
d)
DNS
79.
What is the difference between abstraction and encapsulation in OOP?
a)
Abstraction hides complexity, encapsulation bundles data and methods
b)
Encapsulation hides complexity, abstraction bundles data and methods
80.
What is a spanning tree in graph theory?
a)
A tree that includes all vertices with minimum edges
b)
A tree with cycles
c)
A disconnected subgraph
81.
Which algorithm is used for page replacement in operating systems?
a)
FIFO
b)
LRU
c)
Round-Robin
82.
What does the term 'idempotent' mean in HTTP methods?
a)
A method can be called multiple times without changing the result
b)
A method encrypts data
c)
A method deletes resources
83.
What is the role of the BIOS in a computer?
a)
Manage network connections
b)
Initialize hardware during bootup
c)
Run user applications
84.
Which data structure is used in Python to implement dictionaries?
a)
Linked List
b)
Hash Table
c)
Stack
85.
What is the purpose of the CRUD acronym in databases?
a)
Create, Read, Update, Delete
b)
Compress, Retrieve, Update, Destroy
86.
What is the difference between a clustered and non-clustered index?
a)
Clustered index reorders data rows; non-clustered does not
b)
Non-clustered index reorders data rows; clustered does not
87.
Which algorithm is used to detect cycles in a linked list?
a)
Dijkstra’s Algorithm
b)
Floyd’s Cycle-Finding Algorithm
c)
Breadth-First Search
88.
What is the role of the 'HEAD' pointer in Git?
a)
Track the current branch’s latest commit
b)
Delete a repository
c)
Merge branches
89.
Which language is primarily used for Android app development?
a)
Swift
b)
Kotlin
c)
C#
d)
Python
90.
What is the purpose of the 'chmod' command in Linux?
a)
Change file permissions
b)
Delete a directory
c)
Monitor network traffic
91.
Which theorem ensures distributed systems cannot simultaneously guarantee Consistency, Availability, and Partition Tolerance?
a)
Brewer’s CAP Theorem
b)
Amdahl’s Law
c)
Moore’s Law
Reset
