IT Basics MCQs set 3 for PU CET Lahore (Engineering & CS) computer science — 20 solved questions.
Q1. What is the time complexity of Linear Search?
Answer: O(n)
Explanation: Linear Search checks each element sequentially, resulting in a time complexity of O(n) as the number of comparisons grows linearly with the size of the input.
Q2. What is the purpose of a database index?
Answer: To improve query performance
Explanation: A database index improves query performance by providing a quick way to locate specific data, reducing the need for full table scans.
Q3. What is the difference between HTTP and HTTPS?
Answer: HTTP is not secure, while HTTPS is secure
Explanation: HTTPS (Hypertext Transfer Protocol Secure) is an extension of HTTP, adding an extra layer of security by using encryption to protect data in transit.
Q4. What is the purpose of a cookie?
Answer: To store user data on the client-side
Explanation: Cookies store user data on the client-side, allowing websites to remember user preferences, session information, and other relevant data.
Q5. What is the purpose of a cache?
Answer: To reduce memory access time
Explanation: A cache is a small, fast memory that stores frequently accessed data, reducing memory access time and improving system performance.
Q6. What is the purpose of a deadlock detection algorithm?
Answer: To detect deadlocks
Explanation: A deadlock detection algorithm is used to detect deadlocks, which occur when two or more processes are blocked, waiting for each other to release resources.
Q7. What is the purpose of a relational database?
Answer: To store data in a relational structure
Explanation: A relational database stores data in a relational structure, using tables, rows, and columns to organize and relate data.
Q8. What is the purpose of a SQL query?
Answer: To retrieve specific data
Explanation: A SQL query is used to retrieve specific data from a database, using commands such as SELECT, FROM, and WHERE to filter and manipulate data.
Q9. What is the purpose of a network protocol?
Answer: To enable communication between devices
Explanation: A network protocol is a set of rules and standards that enables communication between devices, ensuring data is transmitted and received correctly.
Q10. What is the purpose of a hash function in a hash table?
Answer: To map keys to indices
Explanation: A hash function maps keys to indices of a backing array, allowing for fast lookups, insertions, and deletions in a hash table.
Q11. Which type of software testing involves testing individual units of code?
Answer: Unit testing
Explanation: Unit testing involves testing individual units of code, such as functions or methods, to ensure they work as expected in isolation.
Q12. Which data structure is suitable for implementing a priority queue?
Answer: Heap
Explanation: A heap is a suitable data structure for implementing a priority queue, as it allows for efficient insertion and removal of elements based on priority.
Q13. What is the purpose of version control systems?
Answer: To manage different versions of code
Explanation: Version control systems, such as Git, manage different versions of code, allowing developers to track changes and collaborate on projects.
Q14. What is the main advantage of using a linked list over an array?
Answer: Dynamic memory allocation
Explanation: Linked lists allow for efficient insertion and deletion of nodes without shifting elements, making them suitable for dynamic data.
Q15. What is the concept of 'Big Data'?
Answer: A large dataset that is difficult to process
Explanation: Big Data refers to large, complex datasets that require specialized tools and techniques to process and analyze.
Q16. What is the role of a 'cookie' in web development?
Answer: To store user data on the client-side
Explanation: Cookies store user data, such as preferences and session information, on the client-side, allowing for personalized experiences.
Q17. What is the 'starvation' problem in operating systems?
Answer: When a process is unable to access resources
Explanation: Starvation occurs when a process is perpetually denied access to necessary resources, often due to other processes holding onto them for extended periods.
Q18. What is the 'paging' technique in memory management?
Answer: Dividing memory into fixed-size blocks
Explanation: Paging divides memory into fixed-size blocks called pages, allowing for efficient use of memory and reducing fragmentation.
Q19. What is the 'Round-Robin' scheduling algorithm?
Answer: A time-slicing scheduling algorithm
Explanation: Round-Robin scheduling allocates a fixed time slice (or quantum) to each process, switching between them to achieve fairness and responsiveness.
Q20. What is 'cloud computing'?
Answer: A model for on-demand access to computing resources
Explanation: Cloud computing provides on-demand access to a shared pool of computing resources, such as servers, storage, and applications, over the internet.