Prep Right
Questions › CSS › Computer Science › 2026
FPSC · CSS 2026

Computer Science, Paper I

100 marks · 3 hours · 7 questions · official PDF, 2 pages
This paper Computer Science · all yearsQ. 2 · Your team needs to share…Q. 3 · What is bit manipulation in…Q. 4 · Why cannot we instantiate an…Q. 5 · Why is Binary Search not…Q. 6 · Why is Maintenance the most…Q. 7 · Construct a Deterministic Finite Automaton…Q. 8 · Suppose a lexical analyzer is…With this paperPart-I MCQs20Official PDF2 pp← 20252026 →
3 hours · questions hide until you reveal them

Section A

Q. 2
  1. (a)Your team needs to share large files quickly but email limits attachments. What computing method should they use and how will it solve the issue? [6]
  2. (b)You receive an email asking for your banking details. What kind of risk or security issue this might be? How to respond? [6]
  3. (c)Your office plans to upgrade hardware but employees don't know what components matter. Which computer hardware components would you explain to help them choose better systems? [8]
(20)
Q. 3
  1. (a)What is bit manipulation in programming and why is it used? Give two examples of its use. [6]
  2. (b)What are arrays? Describe one advantage and one limitation. [6]
  3. (c)Write pseudocode to reverse an array using pointers. [8]
(20)
Q. 4
  1. (a)Why cannot we instantiate an abstract class directly, even though it may contain complete functions? [6]
  2. (b)A class library contains many book objects. Should this be modeled using inheritance or composition? Why? [6]
  3. (c)Demonstrate method overriding using a base class Account and derived class Current Account. Make balance a protected data member. [8]
(20)

Section B

Q. 5
  1. (a)Why is Binary Search not suitable for an unsorted list? [6]
  2. (b)What is the difference between Time Complexity and Space Complexity? Explain with examples. [6]
  3. (c)Write an algorithm with an example showing how Stack can be used to evaluate a postfix expression. [8]
(20)
Q. 6
  1. (a)Why is Maintenance the most expensive phase of the software lifecycle? [6]
  2. (b)What is the purpose of Use Case Diagrams? [6]
  3. (c)Why do Agile projects need frequent customer interaction? [8]
(20)
Q. 7
  1. (a)Construct a Deterministic Finite Automaton (DFA) for the regular expression (a|b)*abb. [6]
  2. (b)Explain the difference among lexeme, token, and pattern with examples. [6]
  3. (c)Consider the three-address code: tl = a + b t2 = t1 + c t3 = t2 + d If the machine has only two registers, how should the compiler allocate registers to minimize memory spills? [8]
(20)
Q. 8
  1. (a)Suppose a lexical analyzer is scanning code and encounters the following input string: 9var = x + 12abc; Describe step-by-step how the lexical analyzer processes this input, identifies errors, and generates tokens. Explain which specific rules of lexical analysis it uses. [6]
  2. (b)A software team is building an online examination system. During requirements gathering, the client says they want "very strong security," but teachers want "fast login without multiple checks." The development team becomes confused because the requirements conflict. Explain how the team should resolve this conflict using proper Software Engineering techniques. Also describe the impact of wrong requirement handling on the SDLC. [6]
  3. (c)A company maintains millions of product IDs and frequently performs searching, insertion, and deletion. The data volume is extremely large, and performance is critical. Which data structure would be most suitable-Binary Search Tree, AVL Tree, Hash Table, or Array? Justify your answer logically using time complexity and memory considerations. [8]
(20)

Related papers

Computer Science 2000Computer Science 2002Computer Science 2003Computer Science 2004Computer Science 2005Computer Science 2006Computer Science 2009Computer Science 2010Computer Science 2011Computer Science 2012Computer Science 2013Computer Science 2015Computer Science 2016Computer Science 2017Computer Science 2018Computer Science 2018Computer Science 2019Computer Science 2019Computer Science 2020Computer Science 2020Computer Science 2021Computer Science 2021Computer Science 2022Computer Science 2022Computer Science 2023Computer Science 2023Computer Science 2024Computer Science 2024Computer Science 2025Computer Science 2025Computer Science 2026Accountancy & Auditing 2026Accountancy & Auditing 2026Agriculture & Forestry 2026Anthropology 2026Arabic 2026Balochi 2026Botany 2026British History 2026Business Administration 2026Chemistry 2026Chemistry 2026Computer Science 2026Constitutional Law 2026Criminology 2026Current Affairs 2026Economics 2026English Essay 2026English Literature 2026English (Précis & Composition) 2026European History 2026Gender Studies 2026General Science & Ability 2026Geology 2026History of Pakistan & India 2026History of USA 2026International Relations 2026International Relations 2026Islamic History & Culture 2026Islamic Studies 2026Journalism & Mass Communication 2026Law 2026Mercantile Law 2026Muslim Law & Jurisprudence 2026Pakistan Affairs 2026Pashto 2026Persian 2026Philosophy 2026Physics 2026Physics 2026Political Science 2026Political Science 2026Psychology 2026Public Administration 2026Punjabi 2026Sindhi 2026Sociology 2026Statistics 2026Town Planning & Urban Management 2026Zoology 2026

About this paper

The 2026 CSS Computer Science paper set by the Federal Public Service Commission. Question wording only; questions marked “Not yet checked” have not been compared with the official paper yet. Open the official paper beside the questions to check any of them.

Disclaimer Prep Right is independent and not affiliated with FPSC.