CSS Computer Science Past Paper 2026 PDF
Federal Public Service Commission (FPSC)
Competitive Examination for Recruitment to BPS-17 Posts under the Federal Government
PAPER: COMPUTER SCIENCE
Time Allowed: 3 Hours
PAPER-I (Objective) 80 Marks
PART-I
Multiple choice Questions. (20)
1. A company wants to upgrade its storage media for fastest possible data access. Which one is the best option?
(A) Hard Disk Drive (HDD)
(B) Optical Drive
(C) Solid State Drive (SSD)
(D) None of these
2. 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
3. A programmer wants to group different data types. What should he/she use?
(A) Structures
(B) Arrays
(C) Unions
(D) None of these
4. A class needs to allow different implementations of a method. What concept to use?
(A) Inheritance
(B) Polymorphism
(C) Encapsulation
(D) None of these
5. 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
6. 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
7. 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
8. A developer wants to define a class with methods that can be used with different data types. What to use?
(A) Templates
(B) Inheritance
(C) Polymorphism
(D) None of these
9. Which operator is typically overloaded for stream insertion?
(A) <<
(B) >>
(C) +
(D) None of these
10. What does the Standard Template Library (STL) provide in C++?
(A) Pre-defined classes for GUI
(B) Pre-defined functions for math operations
(C) Pre-defined containers and algorithms
(D) None of these
11. You are analyzing an algorithm’s efficiency. What do you consider?
(A) Code length
(B) Time and space complexity
(C) Programmer’s experience
(D) None of these
12. In Hash Tables, what is a collision resolution technique?
(A) Linear Search
(B) Binary Search
(C) Chaining
(D) None of these
13. In Recursion, what is crucial to prevent infinite loops?
(A) Base case
(B) Recursive call
(C) Loop usage
(D) None of these
14. You are leading an Agile team developing a mobile app. What’s the primary focus?
(A) Detailed upfront planning
(B) Strict adherence to initial requirements
(C) Both (A) & (B)
(D) Iterative development and customer feedback
15. A compiler needs to recognize tokens. Which phase does this?
(A) Syntax Analysis
(B) Lexical Analysis
(C) Code Generation
(D) None of these
16. What is the advantage of using LL(1) grammars in the Syntax Analysis?
(A) More complex parsing
(B) Predictive parsing with less complexity
(C) No need for grammar rules
(D) None of these
17. 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 start symbol
(D) None of these
18. What do compilers use for recognizing tokens?
(A) Regular expressions
(B) Context-free grammars
(C) Machine code
(D) None of these
19. A project is behind schedule. What is a likely Agile response?
(A) Add more developers
(B) Work longer hours
(C) Both (A) & (B)
(D) Review scope and priorities with team
20. A project is using open-source components with security vulnerabilities. What is the risk?
(A) Security breaches or compliance issues
(B) Non-technical issues
(C) Open-source issues
(D) None of these
Attempt ONLY FOUR questions from PART-II by selecting ONE question from SECTION-A and THREE questions from SECTION-B

