Computer Science Paper I Past Paper 2025

The Computer Science Paper I Past Paper 2025 mixes AI, systems and code. Q.2 covers generative AI, storage devices and two’s complement numbers. Q.3 covers shallow and deep copy, const and static keywords, and pure virtual functions. Q.4 covers an arithmetic series program, a matrix product program and complex numbers. Q.5 covers stream operators and a book management system. Q.6 covers self-balancing trees, Fibonacci recursion and quick sort. Q.7 covers planning phases, validation and verification, and process improvement. Q.8 closes with regular expressions, instruction scheduling and parse trees. The file on this page holds both parts of the paper, the MCQ sheet and the Part-II sheet.

What this paper contains

  • This file carries both parts of the paper: the Part-I MCQ sheet and the Part-II sheet.
  • Part-I (Q.1) — 20 MCQs on the OMR Answer Sheet (20 marks)
  • Part-II — attempt ONLY FOUR questions, TWO from EACH of two sections; each question carries 20 marks

Part-II questions

SECTION-A

Q.2 — (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)
(b) Provide a comparison of different data storage devices in terms of speed, size, access time and cost. (6)
(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 — (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)
(b) State the difference between const keyword and static keyword in C++. Illustrate each keyword with suitable examples. (6)
(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 = 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. (6)
(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 (6)
(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 = √−1. (8) (20)

SECTION-B

Q.5 — (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)
(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 — (a) What are self-balancing Binary Search Trees? Under what circumstances, the self-balancing Binary Search Trees are preferred over Binary Search Tree? (6)
(b) Give pseudocode of implementing Fibonacci sequence recursively. Find the time complexity of this approach and explain how it is calculated. (6)
(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 — (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)
(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)
(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 — (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)
(b) What is Instruction Scheduling? Explain its role during code generation process. (6)
(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)

Computer Science Paper I Past Paper 2024 · All Computer Science Past Papers