1. What is the time complexity of linear search in the worst case?
A) O(1)
B) O(log n)
C) O(n)
D) O(n log n)
2. What is required for binary search to work correctly?
A) Hash table
B) Sorted array
C) Linked list
D) Random elements
3. What is a base case in recursion?
A) The starting point of the loop
B) The condition that ends the recursion
C) The maximum stack size
D) A data structure used in recursion
4. Which problem may occur with deep recursion?
A) Memory leak
B) Stack overflow
C) Null pointer exception
D) Infinite loop
5. Which data structure is used in Breadth-First Search (BFS)?
A) Stack
B) Queue
C) Tree
D) Hash Map
6. BFS is commonly used for:
A) Sorting data
B) Depth-based analysis
C) Finding the shortest path
D) Recursion optimization
7. What is one way to implement Depth-First Search (DFS)?
A) With a queue
B) Using recursion
C) Using hashing
D) With a priority queue
8. What must you consider when running DFS on a cyclic graph?
A) Use of priority queue
B) Path length calculation
C) Detecting and avoiding infinite loops
D) Running BFS first
9. What is the primary purpose of HTTP?
A) File compression
B) Image editing
C) Client-server communication
D) Encryption of emails
10. How is HTTPS different from HTTP?
A) It uses FTP for file transfer
B) It guarantees faster speed
C) It encrypts the communication
D) It bypasses TCP/IP
11. What is TCP responsible for?
A) Broadcasting
B) Reliable data transmission
C) Image compression
D) DNS resolution
12. What is a key feature of UDP?
A) Packet acknowledgment
B) Slow transmission
C) Guaranteed delivery
D) Low latency, no delivery guarantee
13. Which is a use case of WebSockets?
A) One-time file transfer
B) Real-time two-way communication
C) Sending emails
D) DNS resolution
14. FTP is used for:
A) Secure browsing
B) Graph traversal
C) File transfers
D) Video streaming
15. SMTP handles:
A) Web page rendering
B) Video buffering
C) Sending emails
D) Receiving text messages
16. What does REST API stand for?
A) Random Easy Service Transfer
B) Remote Encrypted State Transfer
C) Representational State Transfer
D) Real Secure Transfer
17. Which protocol enhances security over HTTP?
A) TCP
B) FTP
C) UDP
D) TLS/SSL
18. ASCII is limited because it:
A) Uses too much memory
B) Does not support images
C) Can only encode 128 characters
D) Is used only in mobile devices
19. Unicode is better than ASCII because:
A) It uses simpler logic
B) It compresses images
C) It supports multiple languages
D) It is based on recursion
20. Base64 is used to:
A) Encode images into colors
B) Convert binary data into readable text
C) Compress text files
D) Encrypt passwords