Computer Science MCQs

Prepare for competitive exams like CSS, PPSC, and PMA with Computer Science MCQs. Perfect for sharpening your tech skills and acing your exams!

English Tenses Quiz

1. Who is considered the father of computer science?

A. Charles Babbage
B. Alan Turing
C. Bill Gates
D. Steve Jobs

2. Which of the following is the primary function of the CPU in a computer?

A. Perform calculations and logic operations
B. Store data
C. Manage network connections
D. Display images on screen

3. Which programming language is known for its use in web development and is popular for both front-end and back-end?

A. JavaScript
B. Python
C. C++
D. Java

4. Which data structure uses LIFO (Last In, First Out) method?

A. Stack
B. Queue
C. Array
D. Linked List

5. What is the main purpose of an operating system?

A. Manage hardware and software resources
B. Run applications
C. Provide security
D. Control network connections

6. Which sorting algorithm has the best average case time complexity?

A. Merge Sort
B. Bubble Sort
C. Quick Sort
D. Insertion Sort

7. What does HTTP stand for in networking?

A. Hypertext Transfer Protocol
B. Hypertext Transport Protocol
C. Hyper Transfer Text Protocol
D. Hypertext Translation Protocol

8. Which of the following is NOT a type of database?

A. NoSQL
B. SQL
C. Hadoop
D. Relational

9. In machine learning, what is the process of training a model to predict outcomes based on data?

A. Supervised Learning
B. Unsupervised Learning
C. Reinforcement Learning
D. Semi-supervised Learning

10. Which protocol is primarily used for email communication?

A. SMTP
B. HTTP
C. FTP
D. POP3

11. What does "cloud computing" refer to?

A. Storing and processing data over the internet
B. Storing data in a local computer
C. Sending data over the network
D. Connecting devices through Bluetooth

12. What is the primary function of a firewall in cybersecurity?

A. Prevent unauthorized access to a network
B. Encrypt sensitive data
C. Monitor network traffic
D. Store user passwords

13. In which of the following fields is Artificial Intelligence (AI) applied?

A. Healthcare
B. Automotive
C. Finance
D. All of the above

14. Which of the following is used in data science for analyzing large data sets?

A. Big Data
B. Internet of Things
C. Blockchain
D. Machine Learning

15. What is the purpose of human-computer interaction (HCI) in software design?

A. To improve user experience
B. To create security features
C. To increase processing speed
D. To reduce data usage

16. Which of the following is the most common markup language used for web pages?

A. HTML
B. CSS
C. JavaScript
D. Python

17. Which of the following is the correct term for an application designed to run on mobile devices?

A. Mobile App
B. Web App
C. Cloud App
D. Desktop App

18. What does the acronym "IoT" stand for?

A. Internet of Things
B. Information of Technology
C. Internet of Text
D. Integrated Online Tools

19. Which of the following is an ethical issue in computing?

A. Data privacy
B. Software piracy
C. Cyberbullying
D. All of the above

20. What does "SDLC" stand for in software development?

A. Software Development Life Cycle
B. System Development Life Cycle
C. Software Design Life Cycle
D. System Design Life Cycle

21. Which of the following programming languages is primarily used for web development?

A. HTML
B. JavaScript
C. Python
D. C++

22. Which data structure is used for storing data in a key-value pair format?

A. Hash Table
B. Array
C. Stack
D. Queue

23. Which of the following is an example of an open-source operating system?

A. Linux
B. Windows
C. MacOS
D. iOS

24. What is the purpose of the DNS (Domain Name System)?

A. Convert domain names into IP addresses
B. Store website data
C. Encrypt website data
D. Host websites

25. Which of the following is used for managing large datasets in data science?

A. Hadoop
B. SQL
C. Excel
D. Python

26. In object-oriented programming, which of the following concepts refers to hiding the internal details of an object?

A. Abstraction
B. Encapsulation
C. Inheritance
D. Polymorphism

27. Which protocol is commonly used to send email over the internet?

A. SMTP
B. HTTP
C. FTP
D. POP3

28. What is the main difference between primary memory and secondary memory?

A. Primary memory is faster and volatile
B. Primary memory is slower but non-volatile
C. Secondary memory is faster
D. Secondary memory is faster and volatile

29. What does the term "cloud computing" refer to?

A. Storing and accessing data and applications over the internet
B. Storing data on your local computer
C. Using computers with powerful hardware
D. Storing data in a USB drive

30. Which of the following is used to access and manage databases?

A. SQL
B. HTML
C. CSS
D. JavaScript

31. What is a common use of machine learning in business?

A. Predicting customer behavior
B. Encrypting sensitive data
C. Managing network traffic
D. Developing hardware components

32. In software engineering, what is the process of identifying and fixing errors in a program called?

A. Debugging
B. Compiling
C. Refactoring
D. Testing

33. What is an advantage of using a relational database?

A. Easy to organize data into tables
B. Supports only large datasets
C. Can store files of any format
D. Requires no backup system

34. Which of the following is a characteristic of an algorithm?

A. Finiteness
B. Ambiguity
C. Randomness
D. Unpredictability

35. What is a typical use case of the Internet of Things (IoT)?

A. Smart home appliances
B. GPS navigation
C. Email communication
D. Cloud storage

36. What is a unique feature of blockchain technology?

A. Decentralized nature
B. High data storage capacity
C. Uses a central server
D. Limited scalability

37. What is the primary function of an IP address in networking?

A. Identifying devices on a network
B. Sending data packets
C. Encrypting data
D. Routing network traffic

38. Which of the following is an example of an AI technology?

A. Self-driving cars
B. Cloud storage
C. Data analytics
D. Network protocols

39. Which programming language is primarily used for statistical analysis and data visualization?

A. R
B. Python
C. JavaScript
D. Java

40. Which of the following is an example of a high-level programming language?

A. Python
B. Assembly Language
C. Machine Code
D. Binary Code

41. What is the main function of an operating system?

A. Manage computer hardware and software resources
B. Store files and documents
C. Perform calculations
D. Create websites

42. Which of the following is NOT a type of cloud computing service model?

A. SaaS
B. PaaS
C. IaaS
D. IaaaS

43. Which of the following is used to prevent unauthorized access to a network?

A. Firewall
B. VPN
C. Proxy server
D. Router

44. Which of the following is NOT a programming paradigm?

A. Functional Programming
B. Object-Oriented Programming
C. Procedural Programming
D. File Programming

45. What does the acronym "IP" stand for in networking?

A. Internet Protocol
B. Internet Package
C. Internal Protocol
D. Information Packet

46. What is the primary function of a database management system (DBMS)?

A. Store, manage, and retrieve data
B. Perform calculations
C. Display web pages
D. Create websites

47. Which of the following is a key feature of Agile methodology in software development?

A. Iterative development
B. Fixed deadlines
C. Detailed documentation
D. Limited collaboration

48. Which algorithm is used to find the shortest path in a graph?

A. Dijkstra's Algorithm
B. Merge Sort
C. Binary Search
D. Quick Sort

49. Which of the following protocols is used for secure communication over a network?

A. HTTPS
B. HTTP
C. FTP
D. SMTP

50. What is the primary purpose of a VPN (Virtual Private Network)?

A. Securely connect to a private network over the internet
B. Transfer data between computers
C. Send email securely
D. Access websites faster

51. What is the main purpose of a compiler?

A. Translate source code into machine code
B. Execute the program
C. Debug the program
D. Display output to the user

52. Which of the following data structures is used to implement recursion?

A. Stack
B. Queue
C. Linked List
D. Array

53. Which of the following is the main function of DNS (Domain Name System)?

A. Convert domain names to IP addresses
B. Secure internet traffic
C. Encrypt data
D. Connect to wireless networks

54. What does the acronym "HTTP" stand for?

A. HyperText Transfer Protocol
B. HyperText Transmission Protocol
C. Hyper Transfer Text Protocol
D. HyperText Technical Protocol

55. In which of the following layers does TCP operate in the OSI model?

A. Transport Layer
B. Data Link Layer
C. Network Layer
D. Application Layer

56. Which programming language is known as the "mother of all programming languages"?

A. Assembly Language
B. COBOL
C. C
D. Fortran

57. In machine learning, which of the following is NOT a type of supervised learning?

A. Classification
B. Regression
C. Clustering
D. Both A and B

58. Which of the following is an example of a non-volatile memory?

A. Hard Disk Drive
B. RAM
C. Cache Memory
D. CPU Register

59. What is the purpose of the "for" loop in programming?

A. To repeat a block of code a certain number of times
B. To execute code until a condition is true
C. To call a function repeatedly
D. To perform conditional operations

60. What is an IP address used for?

A. Identifying a device on a network
B. Encrypting data
C. Routing data through the internet
D. Creating websites

61. Which of the following is the best method to avoid SQL injection attacks?

A. Using prepared statements with parameterized queries
B. Using plain SQL queries
C. Limiting database access to authorized users
D. Obfuscating the SQL query

62. What is the primary purpose of the OSI model in networking?

A. To standardize the communication process between network devices
B. To provide encryption
C. To design hardware components
D. To manage IP addresses

63. Which of the following sorting algorithms has the best average time complexity?

A. Merge Sort
B. Quick Sort
C. Bubble Sort
D. Selection Sort

64. Which data structure is typically used for implementing a breadth-first search (BFS) algorithm?

A. Queue
B. Stack
C. Linked List
D. Array

65. In machine learning, what does the term "overfitting" refer to?

A. The model performs well on training data but poorly on new, unseen data
B. The model is too simple
C. The model generalizes well
D. The model is tested on a larger dataset

66. Which of the following is an example of a non-relational database?

A. MongoDB
B. MySQL
C. PostgreSQL
D. Oracle Database

67. Which of the following programming languages is NOT compiled?

A. Python
B. C
C. C++
D. Java

68. Which protocol is used to send email over the internet?

A. SMTP
B. HTTP
C. FTP
D. IMAP

69. Which of the following is an example of a recursive algorithm?

A. Fibonacci Sequence
B. Merge Sort
C. Quick Sort
D. Binary Search

70. Which of the following is a method of data compression?

A. Huffman Coding
B. Binary Search
C. Merge Sort
D. Dijkstra's Algorithm

71. What does HTML stand for?

A. HyperText Markup Language
B. Hyper Transfer Markup Language
C. Hyper Text Making Language
D. High Text Machine Language

72. Which of the following is NOT an example of a database management system?

A. MongoDB
B. MySQL
C. Oracle
D. Windows

73. What is the full form of "URL"?

A. Uniform Resource Locator
B. Uniform Registered Locator
C. Universal Resource Locator
D. Universal Registration Locator

74. Which algorithm is used for finding the shortest path in a graph?

A. Dijkstra's Algorithm
B. Bubble Sort
C. Merge Sort
D. Depth-First Search

75. In object-oriented programming, what does the "class" keyword represent?

A. A blueprint for creating objects
B. A variable
C. A data structure
D. A function

76. Which programming language is used for web development?

A. JavaScript
B. Python
C. C++
D. Ruby

77. Which of the following is a type of loop in programming?

A. For Loop
B. If Statement
C. Switch Statement
D. Else Block

78. Which of the following is a widely-used cloud storage service?

A. Google Drive
B. Dropbox
C. iCloud
D. All of the above

79. What is the main function of an operating system?

A. Manage hardware and software resources
B. Process user data
C. Execute applications
D. Provide a user interface

80. Which of the following is a characteristic of cloud computing?

A. On-demand access to computing resources
B. Localized data storage
C. Limited scalability
D. Requires physical infrastructure

81. What is the main goal of "data normalization" in databases?

A. Minimize redundancy and dependency
B. Encrypt data
C. Secure the database
D. Improve query performance

82. Which of the following is the correct definition of a "primary key" in a relational database?

A. A unique identifier for a record in a table
B. A column that stores password data
C. A column that stores foreign references
D. A secondary identifier for records

83. Which of the following programming languages is used for developing Android applications?

A. Java
B. Swift
C. C#
D. Kotlin

84. Which of the following is an example of a version control system?

A. Git
B. GitHub
C. Bitbucket
D. All of the above

85. Which of the following is the main feature of "virtualization" in cloud computing?

A. Creation of virtual machines from physical servers
B. Storage of data on remote servers
C. Secure communication between devices
D. Accessing files on a distributed network

86. Which of the following is NOT a type of database model?

A. Relational
B. Graph
C. Cloud
D. Hierarchical

87. In Python, which of the following is used to create a function?

A. def
B. func
C. function
D. method

88. What does the acronym "URL" stand for?

A. Uniform Resource Locator
B. Uniform Registration Locator
C. Universal Resource Locator
D. Universal Registration Locator

89. What is the main function of the "while" loop in programming?

A. To execute a block of code as long as a condition is true
B. To execute a block of code a specific number of times
C. To choose between different code paths
D. To create a function

90. Which of the following is the main purpose of an operating system?

A. To manage hardware resources
B. To run user programs
C. To store data
D. To connect the system to the internet

91. What does the acronym "CSS" stand for in web development?

A. Cascading Style Sheets
B. Creative Style Sheets
C. Computer Style Sheets
D. Common Style Sheets

92. In which year was the first version of Microsoft Windows released?

A. 1985
B. 1990
C. 2000
D. 1995

93. Which of the following is NOT a type of cloud service?

A. IaaS
B. PaaS
C. SaaS
D. XaaS

94. Which of the following protocols is used for secure communication over the internet?

A. HTTPS
B. HTTP
C. FTP
D. TCP

95. Which language is primarily used for Android app development?

A. Java
B. C#
C. Python
D. Swift

96. What is the full form of "URL"?

A. Uniform Resource Locator
B. Uniform Registered Locator
C. Universal Resource Locator
D. Universal Registration Locator

97. Which of the following is the main function of the ARPANET?

A. To serve as the precursor of the internet
B. To serve as a communication system for military
C. To connect universities for research purposes
D. All of the above

98. What is the function of a firewall in computer networking?

A. To protect a network from unauthorized access
B. To allow all types of traffic
C. To increase network speed
D. To monitor network usage

99. Which of the following is a feature of cloud computing?

A. On-demand access to resources
B. Local storage of data
C. Requires dedicated hardware
D. None of the above

100. In a computer system, the primary memory is also known as:

A. RAM
B. ROM
C. Cache
D. Hard Disk

101. Which data structure is used in a breadth-first search algorithm?

A. Queue
B. Stack
C. Array
D. Linked List

102. Which of the following is the main characteristic of an object in object-oriented programming?

A. It represents an instance of a class
B. It stores data only
C. It can have multiple classes
D. It can only store static data

103. What is the main difference between a compiler and an interpreter?

A. A compiler translates the entire program at once, while an interpreter translates line-by-line
B. A compiler works only with high-level languages
C. An interpreter translates machine code
D. There is no difference between a compiler and an interpreter

104. Which of the following programming languages is known for being "object-oriented"?

A. Java
B. C
C. Python
D. C++

105. What is the primary purpose of the TCP/IP protocol?

A. To enable communication between different networks
B. To provide network security
C. To format data for transmission
D. To optimize bandwidth usage

106. What does the term "GUI" stand for in computing?

A. Graphical User Interface
B. General User Interface
C. General Unit Interface
D. Graph Unit Interface

107. Which of the following is an example of a markup language?

A. HTML
B. Python
C. Java
D. C++

108. Which protocol is used to send email?

A. SMTP
B. HTTP
C. FTP
D. POP3

109. Which of the following is a characteristic of a relational database?

A. Data is stored in tables
B. Data is stored in hierarchical format
C. Data is stored in key-value pairs
D. Data is stored in cloud storage

110. Which of the following is used to identify a device on a network?

A. IP Address
B. MAC Address
C. DNS
D. All of the above

111. What does the acronym "HTTP" stand for?

A. HyperText Transfer Protocol
B. HyperText Transaction Protocol
C. Hyper Transfer Text Protocol
D. None of the above

112. Which data structure is used for implementing a LIFO (Last In First Out) method?

A. Stack
B. Queue
C. Linked List
D. Tree

113. What is the main purpose of DNS (Domain Name System)?

A. To translate domain names into IP addresses
B. To encrypt data on the internet
C. To protect networks from attacks
D. To manage email services

114. What does the term "HTTP status code 404" mean?

A. Page Not Found
B. Bad Request
C. Unauthorized
D. Server Error

115. Which of the following is a feature of Agile Software Development?

A. Iterative and Incremental Development
B. Waterfall Approach
C. Rigid Project Planning
D. Heavy Documentation

116. Which of the following is a major component of an operating system?

A. Kernel
B. Processor
C. RAM
D. Hard Drive

117. Which of the following is an example of a programming paradigm?

A. Object-Oriented Programming
B. Structured Programming
C. Functional Programming
D. All of the above

118. What does the "cloud" refer to in cloud computing?

A. A network of servers used to store data
B. The physical storage on a local computer
C. A new type of server used for storage
D. None of the above

119. What does the acronym "SQL" stand for in database management?

A. Structured Query Language
B. Simple Query Language
C. Standardized Query Language
D. Secure Query Language

120. Which programming language is commonly used for artificial intelligence?

A. Python
B. Java
C. C++
D. Ruby

121. What is the main purpose of an algorithm in computer science?

A. To solve a problem by following a set of instructions
B. To store data
C. To build hardware
D. To create web applications

122. Which of the following is a characteristic of cloud computing?

A. On-demand resource access
B. Fixed resources
C. Requires high local storage
D. Cannot scale easily

123. Which of the following is a type of non-relational database?

A. MongoDB
B. MySQL
C. PostgreSQL
D. Oracle

124. What is the role of a compiler in programming?

A. To convert source code into machine code
B. To interpret source code directly
C. To run the program
D. To store the program

125. Which of the following programming languages is object-oriented?

A. Python
B. C
C. Assembly
D. JavaScript

126. Which of the following is NOT a valid type of network topology?

A. Star
B. Mesh
C. Tree
D. Grid

127. In which layer of the OSI model does routing occur?

A. Network Layer
B. Transport Layer
C. Data Link Layer
D. Application Layer

128. Which protocol is used for secure communication over the Internet?

A. HTTPS
B. HTTP
C. FTP
D. SMTP

129. What is the main advantage of using a distributed system?

A. Fault tolerance and scalability
B. Easy to implement
C. Low cost
D. Centralized control

130. What is the purpose of an IP address?

A. To identify devices on a network
B. To encrypt data
C. To assign a username to a device
D. To provide an internet connection

131. Which of the following is NOT a type of malware?

A. Virus
B. Trojan Horse
C. Firewall
D. Worm

132. What is the use of a firewall in a network?

A. To monitor and control incoming and outgoing network traffic
B. To protect against malware
C. To encrypt data
D. To manage DNS

133. Which of the following programming languages is primarily used for web development?

A. JavaScript
B. Python
C. C++
D. C#

134. What is the main purpose of a cache memory?

A. To store frequently accessed data for faster retrieval
B. To store the operating system
C. To store large files
D. To maintain system security

135. Which of the following is an example of a cloud storage service?

A. Google Drive
B. Dropbox
C. OneDrive
D. All of the above

136. Which data structure is used to implement a priority queue?

A. Heap
B. Stack
C. Queue
D. Linked List

137. What does the "cloud" refer to in cloud computing?

A. Remote servers hosted over the internet
B. Physical servers within a local data center
C. The software used to manage a network
D. None of the above

138. Which of the following is a feature of an object-oriented programming language?

A. Encapsulation
B. Recursion
C. Iteration
D. Sorting

139. Which of the following is a cloud computing service provider?

A. Amazon Web Services (AWS)
B. Microsoft Azure
C. Google Cloud
D. All of the above

140. Which of the following is an example of a client-side scripting language?

A. JavaScript
B. PHP
C. Python
D. Ruby

141. Which of the following is a type of NoSQL database?

A. MongoDB
B. MySQL
C. PostgreSQL
D. Oracle

142. Which of the following best describes the purpose of a DNS server?

A. To translate domain names to IP addresses
B. To provide email services
C. To create backups of data
D. To optimize network performance

143. In which type of software development model is the process iterative?

A. Agile
B. Waterfall
C. V-Model
D. Spiral

144. Which of the following is a primary function of an operating system?

A. Managing hardware resources
B. Writing applications
C. Designing websites
D. Analyzing data

145. Which of the following is a type of software vulnerability?

A. Buffer overflow
B. Cloud storage
C. Web scraping
D. Encryption

146. What is the main purpose of version control systems like Git?

A. To track and manage changes to code
B. To deploy applications
C. To store project files
D. To debug code

147. What is the primary use of the HTTP protocol in web development?

A. To transfer data over the internet
B. To secure network traffic
C. To store web pages
D. To encrypt data

148. Which of the following is NOT an operating system?

A. Linux
B. Windows
C. Android
D. Python

149. Which of the following is a form of machine learning where the model is trained with labeled data?

A. Supervised learning
B. Unsupervised learning
C. Reinforcement learning
D. Evolutionary learning

150. Which of the following is a technique used in machine learning to avoid overfitting?

A. Cross-validation
B. Data augmentation
C. Regularization
D. All of the above
Computer Science MCQs