NUST NET Engineering Test computer science: IT Basics MCQs

Practice IT Basics MCQs for NUST NET Engineering Test computer science — topic-wise sets with solved answers.

NUST NET Engineering Test computer science: IT Basics MCQs — sample questions

  1. Question 1

    Q1. What is the primary function of a compiler?

    • A) To translate source code into machine code
    • B) To execute source code directly
    • C) To debug source code
    • D) To optimize source code

    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.

  2. Question 2

    Q2. What data structure follows LIFO?

    • A) Queue
    • B) Stack
    • C) Tree
    • D) Graph

    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.

  3. Question 3

    Q3. What is the time complexity of binary search?

    • A) O(1)
    • B) O(log n)
    • C) O(n)
    • D) O(n log n)

    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.

  4. Question 4

    Q4. What is the primary purpose of an operating system?

    • A) To manage computer hardware and provide services to software
    • B) To compile source code
    • C) To debug applications
    • D) To optimize database queries

    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.

  5. Question 5

    Q5. Which protocol is used for sending emails?

    • A) SMTP
    • B) HTTP
    • C) FTP
    • D) TCP

    Answer: SMTP

    Explanation: SMTP (Simple Mail Transfer Protocol) is used for sending and receiving email between email servers and clients.

  6. Question 6

    Q6. What is the difference between RAM and ROM?

    • A) RAM is non-volatile, ROM is volatile
    • B) RAM is used for storage, ROM is used for execution
    • C) RAM is volatile, ROM is non-volatile
    • D) RAM is slower, ROM is faster

    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.

  7. Question 7

    Q7. What is a firewall?

    • A) A device that enhances network speed
    • B) A system that controls incoming and outgoing network traffic
    • C) A protocol for secure data transfer
    • D) A software for data recovery

    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.

  8. Question 8

    Q8. What is the function of DNS?

    • A) To translate domain names into IP addresses
    • B) To assign IP addresses dynamically
    • C) To manage email services
    • D) To host websites

    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.

  9. Question 9

    Q9. What is the purpose of a VPN?

    • A) To increase internet speed
    • B) To provide secure and encrypted connection over a public network
    • C) To manage network traffic
    • D) To block advertisements

    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.

  10. Question 10

    Q10. What is the advantage of using a linked list over an array?

    • A) Faster access time
    • B) Dynamic size and efficient insertion/deletion
    • C) Less memory usage
    • D) Simpler implementation

    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.

  11. Question 11

    Q11. What is the purpose of a cookie in web browsing?

    • A) To store user preferences and track user sessions
    • B) To enhance browser security
    • C) To block malicious scripts
    • D) To improve page loading speed

    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.

  12. Question 12

    Q12. What is the difference between a hub and a switch?

    • A) A hub is intelligent, a switch is not
    • B) A hub broadcasts data to all ports, a switch sends data to the intended recipient
    • C) A hub operates at layer 3, a switch at layer 2
    • D) A hub is faster, a switch is slower

    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.

  13. Question 13

    Q13. What is the role of a router in a network?

    • A) To connect devices within a network
    • B) To connect multiple networks and route traffic between them
    • C) To enhance network security
    • D) To optimize network speed

    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.

  14. Question 14

    Q14. What is the primary function of a database management system?

    • A) To store and manage data efficiently
    • B) To compile source code
    • C) To debug applications
    • D) To optimize network performance

    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.

  15. Question 15

    Q15. What is normalization in database design?

    • A) The process of optimizing database performance
    • B) The process of organizing data to minimize data redundancy
    • C) The process of securing database from unauthorized access
    • D) The process of backing up database

    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.

  16. Question 16

    Q16. What is the difference between TCP and UDP?

    • A) TCP is connectionless, UDP is connection-oriented
    • B) TCP is connection-oriented, UDP is connectionless
    • C) TCP is faster, UDP is slower
    • D) TCP is used for email, UDP is used for web

    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.

  17. Question 17

    Q17. What is the purpose of a subnet mask?

    • A) To determine the network and host parts of an IP address
    • B) To assign IP addresses dynamically
    • C) To manage network traffic
    • D) To enhance network security

    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.

  18. Question 18

    Q18. What is the function of an IP address?

    • A) To identify a device on a network
    • B) To manage network traffic
    • C) To enhance network security
    • D) To optimize network speed

    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.

  19. Question 19

    Q19. What is the advantage of cloud computing?

    • A) Reduced scalability
    • B) Increased capital expenditure
    • C) On-demand resource availability and scalability
    • D) Enhanced data security risks

    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.

  20. Question 20

    Q20. What is the primary purpose of encryption?

    • A) To compress data
    • B) To protect data from unauthorized access
    • C) To enhance network performance
    • D) To backup data

    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...