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

Computer Science, Paper I

100 marks · 3 hours · 7 questions · official PDF, 3 pages
This paper Computer Science · all yearsQ. 2 · Attempt the following:Q. 3 · Attempt the following:Q. 4 · (a) Write a C++ program…Q. 5 · Attempt the following:Q. 6 · Attempt the following:Q. 7 · Attempt the following:Q. 8 · Attempt the following:With this paperPart-I MCQs20Official PDF3 pp← 20242025 →
3 hours · questions hide until you reveal them

Section A

Q. 2

Attempt the following:

  1. (a)How is the Generative AI creating impacts on our society? Discuss the benefits and challenges associated with its use. Support your answer by adding examples. [6]
  2. (b)Provide a comparison of different data storage devices in terms of speed, size, access time and cost. [6]
  3. (c)What are Two's Complement numbers? Explain the working of it with examples. Discuss the practical scenarios where these numbers are used. [8]
(20)
Q. 3

Attempt the following:

  1. (a)What is the difference between shallow copy and deep copy of creating objects in C++. Discuss the cases where a specific copy should be used by providing examples. [6]
  2. (b)State the difference between const keyword and static keyword in C++. Illustrate each keyword with suitable examples. [6]
  3. (c)Explain the role of pure virtual functions in implementing abstract classes in C++. How do they differ from virtual functions? Give an example of C++ classes where both types of functions are used. [8]
(20)
Q. 4

(a) Write a C++ program to output the arithmetic series of n terms. The series formula for calculating the sum of n terms is as follows: Sn=n2[2a+(n−1)d]S_n = \frac{n}{2} [2a + (n-1) d] , with values a = 5, d= 3 and n= 6, where a = first term, d= common difference and n = number of terms.

(b) Write a C++ program to calculate and display the product of two matrices of order 2 x 2. The program should prompt the user to provide values of both matrices

(c) Write a C++ program to demonstrate the two different complex numbers using structure. The program should use function to calculate the sum of complex numbers and display their result in the specific format such as (a + bi), where a and b are the real and imaginary part respectively and i is imaginary unit such as i=−1i = \sqrt{-1}.

Checked against official paper
(20)

Section B

Q. 5

Attempt the following:

  1. (a)Demonstrate the use of stream insertion and extraction operators for creating custom objects. Provide a suitable coding example for illustrating the functional difference between them. [10]
  2. (b)Implement a Book Management System consisting of three different classes. The book class should have data members such as book name, ISBN number, and publication year. The author class should have attributes such as author name, and author email. The publisher class contains attributes such as publisher name, publisher email and publisher address. Each book has an author and a publisher. The author and publisher are created and destroyed with books. When the book is deleted, the corresponding author and publisher should also be deleted. Write a C++ code of this system and explain how the composition relationship is used in this system. [10]
(20)
Q. 6

Attempt the following:

  1. (a)What are self-balancing Binary Search Trees? Under what circumstances, the self-balancing Binary Search Trees are preferred over Binary Search Tree? [6]
  2. (b)Give pseudocode of implementing Fibonacci sequence recursively. Find the time complexity of this approach and explain how it is calculated. [6]
  3. (c)Suppose you are the owner of a small manufacturing company that delivers goods to customers. During the sale season, you received a huge number of orders. To efficiently manage the orders, you need to sort the packages based on their weights. You are provided with the weights of 10 parcels (in kilograms) as shown below. Use the quick sort method to sort these parcels in ascending order. Weights: [30, 45, 10, 20, 75, 15, 85, 40, 05, 65] Clearly indicate the choice of pivot and reason for it. Provide a graphical representation with explanation at each step. [8]
(20)
Q. 7

Attempt the following:

  1. (a)A project management involves different types of planning stages to finalize the project. Discuss the different types of planning phases conducted during software development with list of specific tasks performed during each planning stage. [6]
  2. (b)Illustrate the difference between software validation and software verification testing techniques. Give examples to strengthen your answer. Clearly elaborate the case where each type of technique should be used. [6]
  3. (c)What is the Software Process Improvement (SPI) framework? Highlight the different steps of SPI framework and the key elements involved. Also provide the description of the models used within SPI framework and how to determine the projects for which SPI framework should be used. [8]
(20)
Q. 8

Attempt the following:

  1. (a)Create a regular expression for the language that always starts with string "baa". Also draw the deterministic finite automata (DFA) for such language. Provide a clear explanation of each step. [6]
  2. (b)What is Instruction Scheduling? Explain its role during code generation process. [6]
  3. (c)What is a parse tree? How the parse tree is used to check whether a specific string belongs to a language or not. Provide example to elaborate this. [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 2026Computer Science 2026Accountancy & Auditing 2025Accountancy & Auditing 2025Agriculture & Forestry 2025Anthropology 2025Applied Mathematics 2025Arabic 2025Balochi 2025Botany 2025British History 2025Business Administration 2025Chemistry 2025Chemistry 2025Comparative Study of Major Religions 2025Computer Science 2025Constitutional Law 2025Criminology 2025Economics 2025Economics 2025English Essay 2025English Literature 2025English (Précis & Composition) 2025Environmental Sciences 2025European History 2025Gender Studies 2025General Science & Ability 2025Geography 2025Geology 2025Governance & Public Policies 2025History of Pakistan & India 2025International Law 2025International Relations 2025International Relations 2025Islamic History & Culture 2025Journalism & Mass Communication 2025Law 2025Mercantile Law 2025Muslim Law & Jurisprudence 2025Pakistan Affairs 2025Pashto 2025Persian 2025Philosophy 2025Physics 2025Physics 2025Political Science 2025Political Science 2025Psychology 2025Public Administration 2025Punjabi 2025Sindhi 2025Sociology 2025Statistics 2025Town Planning & Urban Management 2025Urdu Literature 2025Zoology 2025

About this paper

The 2025 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.