Practice IT Basics MCQs for Bahria University Entry Test computer science — topic-wise sets with solved answers.
Q1. What is the primary function of a compiler?
Answer: To translate source code into machine code
Explanation: A compiler translates source code into machine code that the computer's processor can execute directly, a process essential for programming.
Q2. What data structure follows LIFO?
Answer: Stack
Explanation: LIFO (Last In, First Out) is a principle where the last item added is the first to be removed, characteristic of a stack data structure.
Q3. What is the time complexity of binary search?
Answer: O(log n)
Explanation: Binary search divides the search interval in half with each step, resulting in a time complexity of O(log n) for n elements.
Q4. What is the primary purpose of an operating system?
Answer: To manage computer hardware and provide services to software
Explanation: An operating system manages computer hardware resources and provides common services to application software, enabling their execution.
Q5. Which protocol is used for sending emails?
Answer: SMTP
Explanation: SMTP (Simple Mail Transfer Protocol) is used for sending and receiving email between email servers and clients.
Q6. What is the difference between RAM and ROM?
Answer: RAM is volatile, ROM is non-volatile
Explanation: RAM (Random Access Memory) is volatile, losing its data when power is turned off, whereas ROM (Read-Only Memory) is non-volatile, retaining its data.
Q7. What is a firewall?
Answer: A system that controls incoming and outgoing network traffic
Explanation: A firewall is a network security system that monitors and controls incoming and outgoing network traffic based on predetermined security rules.
Q8. What is the function of DNS?
Answer: To translate domain names into IP addresses
Explanation: DNS (Domain Name System) translates human-readable domain names into the numerical IP addresses that computers use to communicate.
Q9. What is the purpose of a VPN?
Answer: To provide secure and encrypted connection over a public network
Explanation: A VPN (Virtual Private Network) provides a secure, encrypted connection between a user's device and a VPN server, protecting data from interception.
Q10. What is the advantage of using a linked list over an array?
Answer: Dynamic size and efficient insertion/deletion
Explanation: Linked lists offer dynamic size and efficient insertion/deletion of elements without shifting all elements, unlike arrays.
Q11. What is the purpose of a cookie in web browsing?
Answer: To store user preferences and track user sessions
Explanation: Cookies are small text files stored on a user's device by a web browser, used to store user preferences and track user sessions.
Q12. What is the difference between a hub and a switch?
Answer: A hub broadcasts data to all ports, a switch sends data to the intended recipient
Explanation: A hub broadcasts incoming data to all its ports, whereas a switch forwards data to the specific port of the intended recipient, improving network efficiency.
Q13. What is the role of a router in a network?
Answer: To connect multiple networks and route traffic between them
Explanation: A router connects multiple networks and routes traffic between them, using network address translation and routing tables.
Q14. What is the primary function of a database management system?
Answer: To store and manage data efficiently
Explanation: A DBMS (Database Management System) is software that manages and stores data in a structured and controlled manner, ensuring data integrity and security.
Q15. What is normalization in database design?
Answer: The process of organizing data to minimize data redundancy
Explanation: Normalization involves organizing data in a database to minimize data redundancy and dependency, improving data integrity.
Q16. What is the difference between TCP and UDP?
Answer: TCP is connection-oriented, UDP is connectionless
Explanation: TCP (Transmission Control Protocol) is connection-oriented, ensuring reliable data transfer, whereas UDP (User Datagram Protocol) is connectionless, prioritizing speed over reliability.
Q17. What is the purpose of a subnet mask?
Answer: To determine the network and host parts of an IP address
Explanation: A subnet mask is used to divide an IP address into network and host parts, helping devices determine whether a destination is on the same network.
Q18. What is the function of an IP address?
Answer: To identify a device on a network
Explanation: An IP address is a unique identifier assigned to a device on a network, enabling communication between devices.
Q19. What is the advantage of cloud computing?
Answer: On-demand resource availability and scalability
Explanation: Cloud computing offers on-demand availability of computing resources and scalability, reducing the need for upfront capital expenditure.
Q20. What is the primary purpose of encryption?
Answer: To protect data from unauthorized access
Explanation: Encryption is the process of converting plaintext into unreadable ciphertext, protecting data from unauthorized access and ensuring confidentiality.
Loading...