CSS Computer Science Past Paper 2024

    Optional · 80 marks · three hours

    WhatsApp

    Original FPSC paper

    Download

    Instructions specific to this paper

    • First attempt PART-I (MCQs) on separate OMR Answer Sheet which shall be taken back
    • Overwriting/cutting of the options/answers will not be given credit.
    • There is no negative marking. All MCQs must be attempted.
    • Answers given anywhere else, other than OMR Answer Sheet, will not be considered.
    • Attempt ONLY FOUR questions from PART-II, by selecting TWO questions from EACH

    Questions

    1. Q. 28 marks

      (a) Discuss the future of Information Technology (IT) in Pakistan and its huge impact on all (6) our daily lives. (b) Discuss the difference between a computer virus a trojan and a worm? (6) (c) Discuss the pros and cons of LaTeX in comparison to other document processors.

    2. Q. 36 marks

      (a) Write a program that prompts the user to enter a letter grade A, B, C, D, or F and displays its corresponding numeric value 4, 3, 2, 1, or 0. (b) Write pseudocode OR C-language script for the following expression. (6) (c) Write a version of Breadth First Search (BFS) that finds the distances from the start node (8) to each of the others, rather than the actual paths.

    3. Q. 46 marks

      (a) Write a program that displays the area and perimeter of a rectangle with the width of 4.5 and height of 7.9 using the following formula: area = width * height. (b) Write a program that reads a Celsius degree from the console, then converts it to (6) Fahrenheit and displays the result. The formula for the conversion is as follows: Fahrenheit = (9 / 5) * Celsius + 32. (c) Write a program that prompts the user to enter the month and year and displays the number (8) of days in the month. For example, if the user entered month 2 and year 2024, the program should display that February 2024 had 29 days. If the user entered month 3 and year 2015, the program should display that March 2015 had 31 days.

    4. Q. 56 marks

      (a) Show the output of the following code? public class Test { public static void main(String[] args) { Double x = 3.5; System.out.println(x.intValue()); System.out.println(x.compareTo(4.5)); } } (b) Illustrate the difference between overriding and overloading by the piece of pseudocode or (6) program. (c) How do you prevent a class from being extended? How do you prevent a method from (8) being overridden? Exemplify with simple piece of code.

    5. Q. 68 marks

      (a) For the following data sets, which sorting algorithms would work well, and which would not? a. 10 floating-point values b. 1,000 integers c. 1,000 names d. 100,000 integers with values between 0 and 1,000 e. 100,000 integers with values between 0 and 1 billion f. 100,000 names g. 1 million floating-point values h. 1 million names i. 1 million integers with uniform distribution j. 1 million integers with non-uniform distribution (b) Write an algorithm that implements binary search recursively. Does this version have any (6) advantages or disadvantages compared to the non-recursive version? (c) Write an algorithm that deletes a specified cell from a doubly linked list. Draw a picture (6) that shows the process graphically.

    6. Q. 78 marks

      (a) Discuss the phases of project management including conception and initiation, project (6) planning, project execution, performance/monitoring, and project close. (b) What are the different types of test design techniques? When would you use these types of (6) test design techniques? (c) Exemplify the difference between Quality Assurance, Quality Control, and Testing?

    7. Q. 820 marks

      Write Regular Expression(s) for the following (5 each) I. For date Format of standard e.g. (10.03.2024 | 12/30/2023| 01/01/2022) II. Write a Regular Expression that will match URL e.g. (http://example.edu.pk) III. Write a Regular Expression that will match an IP address. e.g. 192.168.0.1 IV. Write a Regular Expression that will match an email address. e.g. (abc@example.com)

    Standard FPSC instructions

    Printed on this and every CSS paper.

    • Part-II is to be attempted on the separate Answer Book.
    • All the parts (if any) of each question must be attempted at one place instead of at different places.
    • Write Q. No. in the Answer Book in accordance with Q. No. in the question paper.
    • No page/space be left blank between the answers. All the blank pages of the Answer Book must be crossed.
    • Extra attempt of any question or any part of the attempted question will not be considered.

    New papers and past-paper breakdowns, as they drop

    We post CSS and PMS prep every day to 40,000+ aspirants.