PAST PAPER Assistant Director (MIS) PPSCS [SOLVED]

1. What is the primary function of an operating system?
A) Memory management
B) Processing images
C) Compiling code
D) Running hardware diagnostics
Answer: A) Memory management

2. In networking, the term “WAN” stands for:
A) Wide Area Network
B) Wireless Area Network
C) World Area Network
D) Web Access Network
Answer: A) Wide Area Network

3. What does CPU stand for in computing?
A) Central Process Unit
B) Central Processing Unit
C) Core Process Unit
D) Computer Processing Unit
Answer: B) Central Processing Unit

4. Which programming language is primarily used for web development on the server side?
A) JavaScript
B) HTML
C) PHP
D) CSS
Answer: C) PHP

5. The binary number 1010 is equal to which decimal number?
A) 10
B) 5
C) 8
D) 15
Answer: A) 10

6. What does SQL stand for?
A) Structured Quality Language
B) Simple Query Language
C) Structured Query Language
D) Simplified Question Language
Answer: C) Structured Query Language

7. Which of the following is a NoSQL database?
A) MySQL
B) Oracle
C) MongoDB
D) SQL Server
Answer: C) MongoDB

8. In programming, which of these is a loop structure?
A) If-Else
B) While
C) Switch
D) Break
Answer: B) While

9. Which sorting algorithm has a time complexity of O(n^2) in the worst case?
A) Merge Sort
B) Quick Sort
C) Bubble Sort
D) Radix Sort
Answer: C) Bubble Sort

10. What does API stand for?
A) Application Performance Interface
B) Application Programming Interface
C) Advanced Program Interaction
D) Advanced Performance Interface
Answer: B) Application Programming Interface


(Database Systems, Programming, Networking, Data Structures)

11. In SQL, which keyword is used to eliminate duplicate records?
A) UNIQUE
B) DISTINCT
C) DELETE
D) DROP
Answer: B) DISTINCT

12. Which of the following is NOT a relational database management system?
A) SQLite
B) MySQL
C) PostgreSQL
D) Redis
Answer: D) Redis

13. Which data structure uses a Last In, First Out (LIFO) principle?
A) Queue
B) Stack
C) Array
D) Linked List
Answer: B) Stack

14. In OOP, which of the following represents a “has-a” relationship?
A) Inheritance
B) Polymorphism
C) Composition
D) Encapsulation
Answer: C) Composition

15. Which layer of the OSI model is responsible for routing?
A) Application
B) Network
C) Transport
D) Data Link
Answer: B) Network

16. Which of these is a DDL command in SQL?
A) SELECT
B) INSERT
C) UPDATE
D) CREATE
Answer: D) CREATE

17. In C++, which operator is used to access a class’s member functions?
A) ::
B) ->
C) .
D) *
Answer: C) .

18. What is the time complexity of the linear search algorithm?
A) O(1)
B) O(log n)
C) O(n)
D) O(n^2)
Answer: C) O(n)

19. In Python, which keyword is used to define a function?
A) def
B) func
C) function
D) declare
Answer: A) def

20. Which protocol is used for secure data transmission over the internet?
A) HTTP
B) FTP
C) SMTP
D) HTTPS
Answer: D) HTTPS


(Algorithms, Machine Learning, Cybersecurity, Software Engineering)

21. Which algorithm is used for finding the shortest path in a graph?
A) Bubble Sort
B) Dijkstra’s Algorithm
C) Prim’s Algorithm
D) Depth First Search
Answer: B) Dijkstra’s Algorithm

22. In machine learning, which of the following is a supervised learning algorithm?
A) K-means clustering
B) Decision Tree
C) PCA
D) t-SNE
Answer: B) Decision Tree

23. What does “Encapsulation” refer to in object-oriented programming?
A) Inheritance
B) Data hiding
C) Code reuse
D) Object sharing
Answer: B) Data hiding

24. Which of these is used to prevent unauthorized access to a network?
A) Router
B) Firewall
C) Modem
D) Switch
Answer: B) Firewall

25. What is Agile primarily used for in software development?
A) Testing code
B) Managing projects
C) Designing databases
D) Securing networks
Answer: B) Managing projects


(Cloud Computing, Data Science, Computer Architecture, Artificial Intelligence)

26. Which of the following is a platform as a service (PaaS) provider?
A) Amazon EC2
B) Google App Engine
C) Microsoft Azure Storage
D) Dropbox
Answer: B) Google App Engine

27. What is the purpose of a cache memory in computer architecture?
A) To store data permanently
B) To speed up access to frequently used data
C) To reduce electricity usage
D) To connect multiple computers
Answer: B) To speed up access to frequently used data

28. In AI, what does NLP stand for?
A) Neural Language Processing
B) Natural Language Processing
C) Networked Language Programming
D) Node Language Processing
Answer: B) Natural Language Processing

29. Which cloud model is a combination of public and private clouds?
A) Hybrid Cloud
B) Community Cloud
C) Private Cloud
D) Multi-Cloud
Answer: A) Hybrid Cloud

30. Which term describes the action of training a machine learning model with a dataset?
A) Testing
B) Inference
C) Labeling
D) Training
Answer: D) Training


(Operating Systems, Cryptography, Networks, and Data Management)

31. In UNIX, which command is used to list files in a directory?
A) dir
B) list
C) ls
D) cd
Answer: C) ls

32. AES and RSA are algorithms used in:
A) Compression
B) Cryptography
C) Data Mining
D) Graphics
Answer: B) Cryptography

33. The HTTP protocol typically uses which port?
A) 20
B) 25
C) 80
D) 443
Answer: C) 80

34. What is the main function of RAID in storage?
A) Encrypt data
B) Increase storage size
C) Improve data reliability and redundancy
D) Backup data
Answer: C) Improve data reliability and redundancy

35. Which SQL command is used to delete a table’s data without removing the table itself?
A) DROP
B) DELETE
C) REMOVE
D) TRUNCATE
Answer: D) TRUNCATE

36. In Python, the symbol for a comment is:
A) //
B) /* */
C) #
D) <!– –>
Answer: C) #

37. In Java, which keyword is used to inherit a class?
A) this
B) new
C) extends
D) implements
Answer: C) extends

38. What does “IP” stand for in IP address?
A) Internet Protocol
B) Internal Protocol
C) Intranet Protocol
D) Internet Process
Answer: A) Internet Protocol

39. Which data structure is often used for Breadth-First Search?
A) Stack
B) Queue
C) Linked List
D) Hash Table
Answer: B) Queue

40. An intrusion detection system (IDS) is primarily used for:
A) Data storage
B) Virus removal
C) Detecting security breaches
D) Enhancing system performance
Answer: C) Detecting security breaches

41. Which data structure is optimal for implementing a priority queue?
A) Array
B) Stack
C) Linked List
D) Heap
Answer: D) Heap

42. In C programming, which keyword is used to declare a constant?
A) static
B) constant
C) define
D) const
Answer: D) const

43. Which type of database model organizes data in a tree-like structure?
A) Relational
B) Hierarchical
C) Network
D) Object-Oriented
Answer: B) Hierarchical

44. In networking, a subnet mask of 255.255.255.0 indicates which class of IP address?
A) Class A
B) Class B
C) Class C
D) Class D
Answer: C) Class C

45. The term “polymorphism” in object-oriented programming refers to:
A) Code reusability
B) Code readability
C) Using a single interface to represent different data types
D) Data hiding
Answer: C) Using a single interface to represent different data types

46. Which type of machine learning algorithm is used for classification tasks?
A) K-Means Clustering
B) Linear Regression
C) Decision Tree
D) Random Walk
Answer: C) Decision Tree

47. In Python, what function is used to read input from the user?
A) input()
B) read()
C) get()
D) scan()
Answer: A) input()

48. Which SQL statement is used to retrieve unique records from a database table?
A) SELECT DISTINCT
B) SELECT UNIQUE
C) SELECT FILTER
D) SELECT EXCLUSIVE
Answer: A) SELECT DISTINCT

49. The Big-O notation of Merge Sort in the average case is:
A) O(n^2)
B) O(n log n)
C) O(n)
D) O(log n)
Answer: B) O(n log n)

50. Which type of loop guarantees at least one iteration?
A) for loop
B) while loop
C) do-while loop
D) switch loop
Answer: C) do-while loop

51. What does the acronym “ROM” stand for in computing?
A) Read-Only Memory
B) Random Operating Memory
C) Run-On Memory
D) Real Only Memory
Answer: A) Read-Only Memory

52. In software testing, a “black box” test involves:
A) Testing internal code
B) Testing interfaces without knowing internal code
C) Unit testing only
D) Database testing
Answer: B) Testing interfaces without knowing internal code

53. Which protocol is used to send emails?
A) FTP
B) HTTP
C) SMTP
D) SNMP
Answer: C) SMTP

54. What does “IPSec” stand for in network security?
A) Internet Protocol Security
B) Inter Process Security
C) International Protocol Security
D) Internet Proxy Security
Answer: A) Internet Protocol Security

55. In SQL, which keyword is used to combine rows from two or more tables based on a related column?
A) UNION
B) JOIN
C) MERGE
D) LINK
Answer: B) JOIN

56. In HTML, which tag is used to create a hyperlink?
A) <link>
B) <href>
C) <a>
D) <url>
Answer: C) <a>

57. Which one of these is an example of an interpreted language?
A) C
B) C++
C) Python
D) Java
Answer: C) Python

58. Which device operates at the OSI model’s Data Link layer?
A) Router
B) Switch
C) Hub
D) Gateway
Answer: B) Switch

59. The primary role of an intrusion prevention system (IPS) is to:
A) Monitor network traffic
B) Prevent unauthorized access
C) Encrypt data
D) Compress data
Answer: B) Prevent unauthorized access

60. In which type of machine learning is the model trained without any labeled data?
A) Supervised learning
B) Semi-supervised learning
C) Unsupervised learning
D) Reinforcement learning
Answer: C) Unsupervised learning

61. In relational databases, the term “normalization” refers to:
A) Optimizing query speed
B) Eliminating redundancy in data
C) Adding constraints
D) Ensuring network connectivity
Answer: B) Eliminating redundancy in data

62. Which of the following is an AI language developed by IBM for machine learning and data science?
A) R
B) Python
C) SAS
D) Watson Studio
Answer: D) Watson Studio

63. Which of these is considered an unsupervised learning technique?
A) Regression
B) Classification
C) Clustering
D) Decision Tree
Answer: C) Clustering

64. In Linux, which command is used to view all active processes?
A) list
B) proc
C) ps
D) show
Answer: C) ps

65. What does GUI stand for in user interface design?
A) General User Interface
B) Graphical User Interface
C) Guided User Interface
D) Generic User Interface
Answer: B) Graphical User Interface

66. Which type of encryption uses the same key for both encryption and decryption?
A) Asymmetric encryption
B) Symmetric encryption
C) Public-key encryption
D) Open encryption
Answer: B) Symmetric encryption

67. In networking, what does the abbreviation “LAN” represent?
A) Large Area Network
B) Local Area Network
C) Long Access Network
D) Linked Area Network
Answer: B) Local Area Network

68. Which command is used in Linux to delete a directory?
A) rm
B) del
C) erase
D) rmdir
Answer: D) rmdir

69. The process of converting high-level language code to machine code is known as:
A) Interpretation
B) Compilation
C) Assembling
D) Linking
Answer: B) Compilation

70. Which database model uses documents as its primary data structure?
A) Relational
B) Hierarchical
C) Document-oriented
D) Network
Answer: C) Document-oriented


(Systems, Cybersecurity, Machine Learning, Web Development, and Data Management)

71. In a neural network, a “hidden layer” refers to:
A) The input layer
B) The output layer
C) Any intermediate layers
D) The training layer
Answer: C) Any intermediate layers

72. The principle of modularity in programming means:
A) Testing in small parts
B) Breaking down code into reusable functions
C) Optimizing memory usage
D) Structuring code into multiple classes
Answer: B) Breaking down code into reusable functions

73. What does REST stand for in web services?
A) Representational State Transfer
B) Real-time Secure Transfer
C) Random Secure Transmission
D) Remote Server Transmission
Answer: A) Representational State Transfer

74. Which type of virus infects both executable files and the boot sector?
A) Multipartite virus
B) Polymorphic virus
C) Macro virus
D) File infector virus
Answer: A) Multipartite virus

75. A “404” error in HTTP means:
A) Page found but with errors
B) Page not found
C) Server busy
D) Unauthorized access
Answer: B) Page not found

76. Which is the command to display the current working directory in Linux?
A) pwd
B) cd
C) dir
D) ls
Answer: A) pwd

77. A type of malware designed to demand payment in exchange for data decryption is called:
A) Trojan
B) Ransomware
C) Spyware
D) Worm
Answer: B) Ransomware

78. In databases, the ACID properties ensure:
A) Security and compliance
B) Atomicity, Consistency, Isolation, and Durability
C) Automatic backup
D) Data recovery
Answer: B) Atomicity, Consistency, Isolation, and Durability

79. Which technology is associated with the term “blockchain”?
A) Internet of Things
B) Cryptocurrency
C) Augmented Reality
D) Artificial Intelligence
Answer: B) Cryptocurrency

80. Which device translates high-level language into machine language?
A) Compiler
B) Processor
C) Server
D) Compiler and Processor both
Answer: A) Compiler

1. What is the capital city of Pakistan?
A) Lahore
B) Islamabad
C) Karachi
D) Peshawar
Answer: B) Islamabad

2. Which of the following rivers is known as the lifeline of Pakistan?
A) Ravi
B) Indus
C) Chenab
D) Jhelum
Answer: B) Indus

3. In which year did Pakistan become a republic?
A) 1947
B) 1956
C) 1973
D) 1962
Answer: B) 1956

4. What is the largest province of Pakistan by area?
A) Punjab
B) Sindh
C) Balochistan
D) Khyber Pakhtunkhwa
Answer: C) Balochistan

5. Which international organization did Pakistan join in 1950?
A) United Nations
B) NATO
C) SAARC
D) ASEAN
Answer: A) United Nations

6. Who was the first woman Prime Minister of Pakistan?
A) Benazir Bhutto
B) Fatima Jinnah
C) Hina Rabbani Khar
D) Asma Jahangir
Answer: A) Benazir Bhutto

7. Which country shares the longest border with Pakistan?
A) India
B) Afghanistan
C) Iran
D) China
Answer: A) India

8. What is the currency of Pakistan?
A) Dollar
B) Rupee
C) Pound
D) Taka
Answer: B) Rupee

9. Which of the following is a computer network protocol for transferring files?
A) HTTP
B) FTP
C) SMTP
D) IMAP
Answer: B) FTP

10. What is the term for a device that connects multiple computers to form a local area network?
A) Router
B) Hub
C) Switch
D) Modem
Answer: C) Switch

11. What is the value of π (pi) approximately?
A) 2.14
B) 3.14
C) 4.14
D) 5.14
Answer: B) 3.14

12. Which gas do plants primarily absorb during photosynthesis?
A) Oxygen
B) Nitrogen
C) Carbon Dioxide
D) Hydrogen
Answer: C) Carbon Dioxide

13. In which language is the term “سکول” used to refer to a school?
A) English
B) Urdu
C) Arabic
D) Persian
Answer: B) Urdu

14. Which continent is known as the “Dark Continent”?
A) Asia
B) Africa
C) Europe
D) South America
Answer: B) Africa

15. What is the boiling point of water in degrees Celsius?
A) 50°C
B) 75°C
C) 100°C
D) 125°C
Answer: C) 100°C

16. Which element is represented by the symbol “O” in the periodic table?
A) Gold
B) Oxygen
C) Osmium
D) Oganesson
Answer: B) Oxygen

17. What is the official language of Pakistan?
A) English
B) Urdu
C) Punjabi
D) Sindhi
Answer: B) Urdu

18. Which current affair event involved the historic meeting between the leaders of North and South Korea in 2018?
A) Korean War
B) Korean Reunification Summit
C) Panmunjom Declaration
D) G20 Summit
Answer: C) Panmunjom Declaration

19. What is the capital of the province of Sindh?
A) Karachi
B) Hyderabad
C) Sukkur
D) Larkana
Answer: A) Karachi

20. Which programming language is widely used for web development and known for its versatility?
A) Python
B) Java
C) JavaScript
D) C++
Answer: C) JavaScript