100-question MCQs test for Computer Science suitable for PPSC exams. I’ll create a comprehensive set covering all important topics: Programming, Data Structures, Algorithms, Databases, Networking, OS, Software Engineering, Web, AI, etc.
Here’s the first complete set of 100 MCQs with four options each and correct answers at the end:
PPSC Computer Science MCQs Test (100 Questions)
1–20: Programming & Basics
-
Which of the following is not a programming language?
a) Python
b) Java
c) HTML
d) C++ -
Which of these is a compiled language?
a) Python
b) Java
c) C++
d) JavaScript -
What does IDE stand for?
a) Integrated Development Environment
b) Internal Development Engine
c) Integrated Design Environment
d) Internal Data Engine -
Which symbol is used for comments in Python?
a) //
b) #
c) /* */
d) $$ -
Which data type is used to store decimal values in Java?
a) int
b) double
c) char
d) boolean -
What is the output of
print(2**3)in Python?
a) 5
b) 6
c) 8
d) 9 -
Which of the following is a looping statement in C?
a) if
b) while
c) switch
d) break -
Which is not a valid variable name in C?
a) _num
b) 2num
c) num2
d) num_2 -
In Java, which keyword is used to inherit a class?
a) implements
b) extends
c) inherit
d) super -
Which of the following is mutable in Python?
a) tuple
b) string
c) list
d) frozenset -
Which operator is used for equality check in C?
a) =
b) ==
c) !=
d) === -
Which of these is not a primitive data type in Java?
a) int
b) float
c) String
d) char -
Which function is used to read input in Python?
a) input()
b) scanf()
c) cin
d) read() -
Which of these languages is used for web development?
a) HTML
b) Java
c) Python
d) C -
Which of the following is an interpreted language?
a) C++
b) Java
c) Python
d) C -
Which loop executes at least once in C?
a) for
b) while
c) do-while
d) if -
Which of the following is used for exception handling in Java?
a) try-catch
b) if-else
c) do-while
d) switch -
What does
len()function do in Python?
a) Counts elements in a string or list
b) Returns type
c) Converts string to integer
d) Prints output -
Which of these is not an access modifier in Java?
a) public
b) private
c) protected
d) friendly -
Which of the following is used to create a new object in Java?
a) new
b) create
c) object
d) instance
21–40: Data Structures & Algorithms
-
Which data structure uses FIFO?
a) Stack
b) Queue
c) Tree
d) Graph -
Which data structure uses LIFO?
a) Stack
b) Queue
c) Array
d) Linked List -
Which of these is a linear data structure?
a) Tree
b) Graph
c) Queue
d) None -
Which algorithm is used for searching in a sorted array?
a) Linear Search
b) Binary Search
c) Bubble Sort
d) DFS -
What is the worst-case complexity of Bubble Sort?
a) O(n)
b) O(log n)
c) O(n^2)
d) O(n log n) -
Which of these is a non-linear data structure?
a) Array
b) Linked List
c) Graph
d) Queue -
Which traversal is used in Depth-First Search?
a) BFS
b) DFS
c) Level-order
d) Preorder -
Which of the following is not a type of linked list?
a) Singly
b) Doubly
c) Circular
d) Binary -
Which algorithm is used to find the shortest path in a graph?
a) DFS
b) BFS
c) Dijkstra
d) QuickSort -
In a stack, the
pop()function does what?
a) Inserts element
b) Deletes element from top
c) Deletes element from bottom
d) Traverses elements -
What is the time complexity of accessing an element in an array?
a) O(n)
b) O(log n)
c) O(1)
d) O(n^2) -
Which is used for priority-based scheduling?
a) Queue
b) Stack
c) Priority Queue
d) Linked List -
In binary search, what is the condition for a successful search?
a) Linear traversal
b) Array must be sorted
c) Use stack
d) Use queue -
Which of these sorts in place?
a) Merge Sort
b) Quick Sort
c) Heap Sort
d) None -
Which data structure is used in BFS traversal?
a) Stack
b) Queue
c) Array
d) Tree -
What is the height of a balanced binary tree with n nodes?
a) O(1)
b) O(n)
c) O(log n)
d) O(n log n) -
Which of the following is a stable sorting algorithm?
a) Quick Sort
b) Heap Sort
c) Merge Sort
d) Selection Sort -
Which algorithm is divide and conquer?
a) Bubble Sort
b) Merge Sort
c) Linear Search
d) DFS -
Which structure is ideal for implementing recursion?
a) Queue
b) Stack
c) Array
d) Linked List -
What is the complexity of inserting an element at the beginning of a linked list?
a) O(1)
b) O(n)
c) O(log n)
d) O(n log n)
41–60: Database & SQL
-
Which command is used to remove all records from a table in SQL?
a) DELETE
b) TRUNCATE
c) DROP
d) REMOVE -
Which SQL statement is used to retrieve data?
a) SELECT
b) GET
c) RETRIEVE
d) SHOW -
What does PK stand for in databases?
a) Primary Key
b) Public Key
c) Private Key
d) Primary Kind -
Which SQL clause is used to filter rows?
a) WHERE
b) HAVING
c) GROUP BY
d) ORDER BY -
Which of these is not a SQL constraint?
a) NOT NULL
b) UNIQUE
c) DEFAULT
d) INDEX -
Which join returns all records from both tables?
a) INNER JOIN
b) LEFT JOIN
c) RIGHT JOIN
d) FULL OUTER JOIN -
Which command removes a table from the database?
a) DELETE
b) DROP
c) TRUNCATE
d) REMOVE -
What does ACID stand for in databases?
a) Atomicity, Consistency, Isolation, Durability
b) Atomic, Concurrent, Internal, Durable
c) Access, Control, Integrity, Data
d) None -
Which command is used to modify records in a table?
a) UPDATE
b) ALTER
c) MODIFY
d) CHANGE -
Which type of database stores data in key-value pairs?
a) Relational
b) NoSQL
c) SQL
d) Hierarchical -
Which is used to uniquely identify a row in a table?
a) Foreign Key
b) Primary Key
c) Index
d) Constraint -
Which SQL statement is used to remove a column?
a) DROP COLUMN
b) REMOVE COLUMN
c) DELETE COLUMN
d) ALTER COLUMN -
What is the default join in SQL?
a) INNER JOIN
b) LEFT JOIN
c) RIGHT JOIN
d) FULL JOIN -
Which command creates a new table in SQL?
a) NEW TABLE
b) CREATE TABLE
c) INSERT TABLE
d) MAKE TABLE -
Which is used for faster access to records?
a) Index
b) Table
c) View
d) Trigger -
Which SQL function calculates average?
a) SUM()
b) AVG()
c) MEAN()
d) COUNT() -
Which type of key creates a relationship between tables?
a) Primary Key
b) Foreign Key
c) Unique Key
d) Composite Key -
Which clause is used to sort results in SQL?
a) ORDER BY
b) GROUP BY
c) WHERE
d) HAVING -
Which of these SQL commands cannot be rolled back?
a) DELETE
b) UPDATE
c) TRUNCATE
d) INSERT -
What is the default transaction isolation level in SQL Server?
a) READ UNCOMMITTED
b) READ COMMITTED
c) REPEATABLE READ
d) SERIALIZABLE
61–80: Operating System & Networking
-
Which OS is open-source?
a) Windows
b) Linux
c) macOS
d) Solaris -
What is a deadlock?
a) Two processes waiting indefinitely
b) Process termination
c) High CPU usage
d) Memory overflow -
Which scheduling algorithm is preemptive?
a) FCFS
b) SJF
c) Round Robin
d) None -
Which is a network topology?
a) Star
b) Circle
c) Rectangle
d) Triangle -
What does DNS stand for?
a) Domain Name System
b) Data Name System
c) Domain Network Service
d) Data Network Service -
Which layer of OSI is responsible for routing?
a) Transport
b) Network
c) Data Link
d) Session -
Which protocol is used to send emails?
a) FTP
b) SMTP
c) HTTP
d) SNMP -
Which memory is fastest?
a) RAM
b) Cache
c) Hard Disk
d) ROM -
Which is a non-volatile memory?
a) RAM
b) Cache
c) ROM
d) Registers -
Which of these is a connectionless protocol?
a) TCP
b) UDP
c) FTP
d) HTTP -
Which command is used to check network connections?
a) ipconfig
b) ping
c) traceroute
d) netstat -
Which is used to prevent unauthorized access?
a) Firewall
b) Switch
c) Router
d) Hub -
Which OS manages hardware resources?
a) Application
b) Compiler
c) Operating System
d) Interpreter -
Which of these is a network device?
a) Hub
b) CPU
c) RAM
d) Monitor -
Which protocol resolves IP to MAC address?
a) ARP
b) DNS
c) DHCP
d) FTP -
What is a subnet mask used for?
a) Routing
b) IP division
c) MAC filtering
d) Encryption -
Which type of OS allows multiple users simultaneously?
a) Single-user
b) Multi-user
c) Batch
d) Real-time -
Which OS type is used in embedded systems?
a) Real-time OS
b) Batch OS
c) Multi-user OS
d) Distributed OS -
Which protocol is used for secure web communication?
a) HTTP
b) HTTPS
c) FTP
d) SMTP -
What is the function of DNS?
a) Converts domain to IP
b) Encrypts traffic
c) Manages files
d) Routes packets
81–100: Software Engineering, AI & Misc
-
SDLC stands for:
a) Software Development Life Cycle
b) System Development Level Code
c) Software Design Learning Code
d) System Design Life Cycle -
Which model follows iterative development?
a) Waterfall
b) Spiral
c) V-model
d) Big Bang -
Which testing is done by end users?
a) Unit Testing
b) Integration Testing
c) Acceptance Testing
d) System Testing -
Which AI technique is inspired by human brain?
a) Neural Networks
b) Genetic Algorithm
c) Rule-based AI
d) Decision Tree -
Which is not a software quality attribute?
a) Reliability
b) Maintainability
c) Efficiency
d) Volatility -
Which is used for object-oriented analysis?
a) DFD
b) UML
c) ERD
d) Flowchart -
What does HTTP stand for?
a) Hyper Text Transfer Protocol
b) Hyper Text Transmission Protocol
c) Hyper Terminal Transfer Protocol
d) Hyper Transfer Text Protocol -
Which AI method uses trial and error?
a) Reinforcement Learning
b) Supervised Learning
c) Unsupervised Learning
d) Deep Learning -
Which of these is a markup language?
a) Python
b) HTML
c) Java
d) C++ -
Which language is used for AI development?
a) Python
b) C
c) C++
d) All -
What does ERP stand for?
a) Enterprise Resource Planning
b) Enterprise Report Program
c) Electronic Resource Planning
d) Enterprise Resource Program -
Which is a functional testing type?
a) Unit Testing
b) Regression Testing
c) Smoke Testing
d) All -
What is a use case in software engineering?
a) Functional scenario
b) Error handling
c) System design
d) Data flow -
Which algorithm is used in AI search problems?
a) BFS
b) DFS
c) A*
d) Bubble Sort -
Which is used for version control?
a) Git
b) SVN
c) Both
d) None -
What is the main goal of software maintenance?
a) Fix bugs
b) Improve performance
c) Add features
d) All -
Which Python library is used for machine learning?
a) NumPy
b) Pandas
c) Scikit-learn
d) Matplotlib -
What is the function of a compiler?
a) Execute code line by line
b) Convert code to machine language
c) Debug code
d) Store code -
Which of these is a scripting language?
a) Python
b) C++
c) Java
d) Pascal -
Which of the following is used for web APIs?
a) REST
b) SOAP
c) Both
d) FTP
✅ Answer Key
- c | 2. c | 3. a | 4. b | 5. b | 6. c | 7. b | 8. b | 9. b | 10. c
- b | 12. c | 13. a | 14. a | 15. c | 16. c | 17. a | 18. a | 19. d | 20. a
- b | 22. a | 23. c | 24. b | 25. c | 26. c | 27. b | 28. d | 29. c | 30. b
- c | 32. c | 33. b | 34. b | 35. b | 36. c | 37. c | 38. b | 39. b | 40. a
- b | 42. a | 43. a | 44. a | 45. d | 46. d | 47. b | 48. a | 49. a | 50. b
- b | 52. a | 53. a | 54. b | 55. a | 56. b | 57. b | 58. a | 59. c | 60. b
- b | 62. a | 63. c | 64. a | 65. a | 66. b | 67. b | 68. b | 69. c | 70. b
- d | 72. a | 73. c | 74
.jpeg)
.jpeg)
.jpeg)
0 Comments
Post a Comment