FEDERAL PUBLIC SERVICE COMMISSION
COMPETITIVE EXAMINATION FOR RECRUITMENT TO POSTS
IN BPS-17 UNDER THE FEDERAL GOVERNMENT, 2026
COMPUTER SCIENCE, PAPER-I
TIME ALLOWED: THREE HOURS
PART-I (MCQS): MAXIMUM 30 MINUTES
PART-I (MCQS) MAXIMUM MARKS: 20
PART-II MAXIMUM MARKS: 80
PART-I — MCQs
Q. 1. Select the best option/answer. (20 × 1 = 20)
-
A company wants to upgrade its storage media for the fastest possible data access. Which option is best?
(A) Hard Disk Drive (HDD)
(B) Optical Drive
(C) Solid State Drive (SSD)
(D) None of these -
A programmer is developing software and needs to consider ethical challenges. What is a major concern?
(A) Data encryption
(B) Plagiarism
(C) User interface
(D) None of these -
A programmer wants to group different data types. What should be used?
(A) Structures
(B) Arrays
(C) Unions
(D) None of these -
A class needs to allow different implementations of a method. Which concept should be used?
(A) Inheritance
(B) Polymorphism
(C) Encapsulation
(D) None of these -
What is the purpose of using virtual functions in inheritance?
(A) To prevent overriding
(B) To hide members
(C) To enable polymorphism
(D) None of these -
How does the history of computing influence modern computer architecture?
(A) By dictating hardware design
(B) By shaping software development
(C) By influencing both hardware and software
(D) None of these -
A function needs to modify an input variable. How should the parameter be passed?
(A) By value
(B) By reference
(C) By pointer
(D) None of these -
A developer wants to define a class with methods that can be used with different data types. What should be used?
(A) Templates
(B) Inheritance
(C) Polymorphism
(D) None of these -
Which operator is typically overloaded for stream insertion?
(A)
<<
(B)>>
(C)+
(D) None of these - What does the Standard Template Library (STL) provide in C++?
(A) Pre-defined classes for GUI
(B) Pre-defined functions for mathematical operations
(C) Pre-defined containers and algorithms
(D) None of these
- When analyzing an algorithm's efficiency, what should be considered?
(A) Code length
(B) Time and space complexity
(C) Programmer's experience
(D) None of these
- In Hash Tables, which of the following is a collision-resolution technique?
(A) Linear Search
(B) Binary Search
(C) Chaining
(D) None of these
- In recursion, what is crucial to prevent infinite recursion?
(A) Base case
(B) Recursive call
(C) Loop usage
(D) None of these
- You are leading an Agile team developing a mobile application. What is the primary focus?
(A) Detailed upfront planning
(B) Strict adherence to initial requirements
(C) Both (A) and (B)
(D) Iterative development and customer feedback
- A compiler needs to recognize tokens. Which phase performs this task?
(A) Syntax Analysis
(B) Lexical Analysis
(C) Code Generation
(D) None of these
- What is the advantage of using LL(1) grammars in syntax analysis?
(A) More complex parsing
(B) Predictive parsing with less complexity
(C) No need for grammar rules
(D) None of these
- What is the difference between Top-down and Bottom-up parsers?
(A) Top-down is always faster
(B) Bottom-up handles more grammars
(C) Top-down starts from the start symbol
(D) None of these
- What do compilers use for recognizing tokens?
(A) Regular expressions
(B) Context-free grammars
(C) Machine code
(D) None of these
- An Agile project is behind schedule. What is a likely Agile response?
(A) Add more developers
(B) Work longer hours
(C) Both (A) and (B)
(D) Review scope and priorities with the team
- A project is using open-source components containing security vulnerabilities. What is the risk?
(A) Security breaches or compliance issues
(B) Non-technical issues
(C) Open-source issues
(D) None of these
PART-II
NOTE
(i) Part-II is to be attempted on the separate Answer Book.
(ii) Attempt ONLY FOUR questions from Part-II by selecting TWO questions from EACH SECTION. All questions carry equal marks.
(iii) All parts of each question must be attempted at one place instead of at different places.
(iv) Write the question number in the Answer Book according to the question paper.
(v) No page/space should be left blank between answers. All blank pages must be crossed.
(vi) Extra attempt of any question or any part of the question will not be considered.
SECTION-A
Q. 2
(a) Your team needs to share large files quickly, but email has attachment-size limitations. What computing method should they use, and how will it solve the problem? (6)
(b) You receive an email asking for your banking details. What type of risk or security issue might this represent? How should you respond? (6)
(c) Your office plans to upgrade its hardware, but employees do not know which components matter. Which computer-hardware components would you explain to help them choose better systems? (8)
Q. 3
(a) What is bit manipulation in programming, and why is it used? Give two examples of its use. (6)
(b) What are arrays? Describe one advantage and one limitation of arrays. (6)
(c) Write pseudocode to reverse an array using pointers. (8)
Q. 4
(a) Why can an abstract class not be instantiated directly, even though it may contain complete functions? (6)
(b) A class library contains many Book objects. Should this relationship be modeled using inheritance or composition? Explain why. (6)
(c) Demonstrate method overriding using a base class named Account and a derived class named CurrentAccount. Make balance a protected data member. (8)
SECTION-B
Q. 5
(a) Why is Binary Search not suitable for an unsorted list? (6)
(b) What is the difference between Time Complexity and Space Complexity? Explain with examples. (6)
(c) Write an algorithm, with an example, showing how a Stack can be used to evaluate a postfix expression. (8)
Q. 6
(a) Why is Maintenance considered the most expensive phase of the software life cycle? (6)
(b) What is the purpose of Use Case Diagrams? (6)
(c) Why do Agile projects require frequent customer interaction? (8)
Q. 7
(a) Construct a Deterministic Finite Automaton (DFA) for the regular expression:
(a|b)*abb
(6)
(b) Explain the difference among lexeme, token, and pattern, with examples. (6)
(c) Consider the following three-address code:
If the machine has only two registers, explain how the compiler should allocate registers to minimize memory spills. (8)
Q. 8
(a) Suppose a lexical analyzer is scanning the following input:
Describe step-by-step how the lexical analyzer processes this input, identifies errors, and generates tokens. Explain which specific lexical-analysis rules are used. (6)
(b) A software team is developing an online examination system. During requirements gathering, the client asks for “very strong security,” while teachers want “fast login without multiple checks.” These requirements conflict.
Explain how the team should resolve the conflict using proper Software Engineering techniques. Also describe the impact of incorrect requirements handling on the Software Development Life Cycle (SDLC). (6)
(c) A company maintains millions of product IDs and frequently performs searching, insertion, and deletion. Data volume is extremely large and performance is critical.
Which data structure would be most suitable among:
- Binary Search Tree
- AVL Tree
- Hash Table
- Array
Justify your answer logically using time-complexity and memory considerations. (8)
COMPETITIVE EXAMINATION — 2026
TIME ALLOWED: THREE HOURS
PART-I (MCQS): MAXIMUM 30 MINUTES
PART-I (MCQS) MAXIMUM MARKS: 20
PART-II MAXIMUM MARKS: 80
PART-I — MCQs
Q. 1
-
Which statement is true about overloading and overriding?
(A) They are the same.
(B) They are different, but inheritance is not involved in implementing either concept.
(C) Overloading is performed within the same class, whereas overriding is performed among different classes.
(D) None of these. -
Which statement is true about private data members?
(A) They cannot be accessed outside the class except through public methods of that class.
(B) They can be accessed outside the class using objects of that class.
(C) They can be accessed outside the class.
(D) None of these. -
In histogram equalization, applying the technique independently to each RGB channel often causes:
(A) Improved colour constancy
(B) Better noise suppression
(C) Colour distortions due to channel imbalance
(D) None of these -
In a pipelined processor, what is the primary purpose of the instruction pipeline?
(A) To increase the clock speed
(B) To execute multiple instructions simultaneously
(C) To reduce the number of instructions in a program
(D) None of these -
When applying a 2D Fourier Transform to an image, shifting the image spatially causes what corresponding effect in the frequency domain?
(A) Phase modulation
(B) Amplitude scaling
(C) Frequency doubling
(D) None of these -
In morphological image operations, opening differs from closing because opening tends to:
(A) Fill narrow gaps
(B) Remove thin protrusions
(C) Produce higher contrast
(D) None of these -
The main purpose of a Laplacian of Gaussian (LoG) operator in image analysis is to:
(A) Detect extremely low-frequency patterns
(B) Identify regions of uniform colour
(C) Localize edges by combining smoothing and second-order derivatives
(D) None of these -
What does the Data Definition Language (DDL) describe?
(A) How data are structured in the database
(B) What the DBMS requires and the techniques used to process data
(C) How data must be structured to produce the user's view
(D) None of these -
Data Encryption Standard (DES) generates ______-bit round keys.
(A) 16
(B) 32
(C) 48
(D) None of these - In symmetric-key cryptography, the sender and receiver use ______ keys.
(A) Shared
(B) Two
(C) No
(D) None of these
- In modern micro-frontend architectures, the primary benefit of independently deployed UI fragments is:
(A) Tighter coupling across teams
(B) Improved runtime bundling only
(C) Enhanced isolation and autonomous deployment pipelines
(D) None of these
- HTTP/3 improves performance over HTTP/2 mainly because it:
(A) Uses TCP with modified congestion control
(B) Replaces TLS with a custom encryption protocol
(C) Operates over QUIC to avoid head-of-line blocking
(D) None of these
- A major advantage of WebAssembly in computationally intensive web applications is that it:
(A) Eliminates the need for JavaScript entirely
(B) Enables near-native execution speed in browsers
(C) Works only on server-side rendering engines
(D) None of these
- The __________ is one of the fundamental components of a DBMS.
(A) System catalogue
(B) Metadata
(C) Information Resource Dictionary System
(D) None of these
- Which of the following is not a function of a DBMS?
(A) Recovery services
(B) Support for data communication
(C) Funneling
(D) None of these
- Which of the following is not involved in a DBMS?
(A) HTML
(B) Application Request
(C) End Users
(D) None of these
- In peer-to-peer networking:
(A) There is only one server and many clients.
(B) Every computer can act as a client, server, or both at the same time.
(C) There is only one client and many servers.
(D) None of these
- A hardware-resource conflict is more likely to be an IRQ conflict rather than an I/O conflict because:
(A) The BIOS sometimes has more difficulty controlling IRQs.
(B) I/O addresses cannot conflict.
(C) There are many more I/O addresses than IRQs.
(D) None of these
- Which part of the operating system decides what to do when main memory is full?
(A) Process Scheduler
(B) Memory Manager
(C) File System
(D) None of these
- Which of the following is a method of file protection?
(A) Access Control
(B) Deleting a file
(C) Hiding a file
(D) None of these
PART-II
NOTE
(i) Part-II is to be attempted on the separate Answer Book.
(ii) Attempt ONLY FOUR questions from Part-II by selecting TWO questions from EACH SECTION. All questions carry equal marks.
(iii) All parts of each question must be attempted at one place instead of at different places.
(iv) Candidate must write the question number in the Answer Book according to the question paper.
(v) No page/space should be left blank between answers. All blank pages must be crossed.
(vi) Extra attempt of any question or any part of the attempted question will not be considered.
SECTION-A
Q. 2
Machine instructions serve as a critical interface between hardware and software.
Compare the representation and execution behaviour of machine instructions in CISC and RISC architectures.
Evaluate how the instruction cycle organization shapes the design of the control unit, comparing:
- Hardwired control
- Microprogrammed control
(20)
Q. 3
Explain the synergistic relationship between:
- Instruction-Level Parallelism (ILP)
- Superscalar execution
- Multi-core architectures
in modern CPU design.
Analyze how their combined use affects:
- Instruction-pipeline design
- Mitigation of control hazards
- Overall processor throughput
(20)
Q. 4
In large-scale distributed networks, congestion control and congestion avoidance mechanisms are essential for maintaining service quality.
Provide a detailed analysis of the congestion-handling strategies employed in TCP and contrast them with the limitations of UDP under similar conditions.
Explain why transport-layer design decisions influence overall network stability.
(20)
Q. 5
Modern operating systems attempt to balance efficiency and fairness while scheduling processes.
Critically evaluate how Multi-Level Feedback Queues (MLFQ) evolve process priorities over time.
Discuss how this design influences:
- CPU utilization
- Process starvation
and compare it with simpler scheduling algorithms.
(20)
SECTION-B
Q. 6
Normalization aims to improve database-schema quality.
Discuss how violations of:
- Functional dependencies
- Multivalued dependencies
lead to structural anomalies.
Evaluate whether higher normal forms, including:
- 3NF
- BCNF
- 4NF
always benefit large-scale Online Transaction Processing (OLTP) database systems.
(20)
Q. 7
Morphological operations provide powerful tools for manipulating shape-based features.
Discuss the mathematical foundation of:
- Dilation
- Erosion
- Opening
- Closing
Evaluate their applications in tasks such as:
- Document analysis
- Medical-image preprocessing
(20)
Q. 8
Feature extraction is central to computer vision.
Describe how edge-detection techniques differ in their response to:
- Noise
- Texture
- Illumination variations
Compare the boundary-localization accuracy of classical detectors such as:
- Sobel
- Canny
- Laplacian-based methods
(20)