CSS Computer Science Past Paper 2024

PAPER-I (Subjective) 80 Marks

Attempt ONLY FOUR questions from PART-II. (20×4)

PART-II

SECTION-A

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

Q. No. 3
(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.

(c) Write a version of Breadth First Search (BFS) that finds the distances from the start node to each of the others, rather than the actual paths.

Q. No. 4
(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 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 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.

SECTION-B

Q. No. 5
(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 a piece of pseudocode or program.
(c) How do you prevent a class from being extended? How do you prevent a method from being overridden? Exemplify with a simple piece of code.

Q. No. 6
(a) For the following data sets, which sorting algorithms would work well, and which would not?

  1. 10 floating-point values
  2. 1,000 integers
  3. 1,000 names
  4. 100,000 integers with values between 0 and 1,000
  5. 100,000 integers with values between 0 and 1 billion
  6. 100,000 names
  7. 1 million floating-point values
  8. 1 million names
  9. 1 million integers with uniform distribution
  10. 1 million integers with non-uniform distribution

(b) Write an algorithm that implements binary search recursively. Does this version have any 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 that shows the process graphically.

Q. No. 7
(a) Discuss the phases of project management including conception and initiation, project 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 test design techniques?
(c) Exemplify the difference between Quality Assurance, Quality Control, and Testing.

Q. No. 8
Write Regular Expression(s) for the following:
(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).

PAPERII (Subjective) 80 Marks

Attempt ONLY FOUR questions from PART-II. (20×4)

PART-II

SECTION-A

Q. No. 2
(a) Why are multi-processor systems considered advantageous in computer architecture? How does parallel processing fundamentally improve the performance and scalability of a computer system?
(b) How does the choice of architectural level impact the performance of a computer system? Provide a numerical comparison between two different architectural levels, highlighting their strengths and weaknesses.
(c) If a processor executes 1 billion instructions per second and has an instruction execution cycle of 4 cycles per instruction, calculate the overall execution time for a program with 1 million instructions. Discuss how reducing the number of cycles per instruction can impact performance.

Q. No. 3
(a) Why is cache memory considered a critical component in a computer system? How does the internal and external data representation contribute to optimizing memory usage and system efficiency?
(b) Explain the concept of parallelism in computer architecture. How does the internal structure of a microprocessor contribute to parallel processing capabilities?
(c) Break down the stages of the instruction execution cycle in a computer system. How do the characteristics of CISC and RISC architectures influence the execution cycle?

Q. No. 4
(a) Compare the OSI and TCP/IP models in terms of their simplicity and practicality. Why is a layered approach beneficial in network design?
(b) Explain how overlay content distribution networks enhance the performance and scalability of internet services. Provide a numerical example to illustrate their impact on content delivery.
(c) If the internet were a city and each device had its own unique street address, how does IP addressing work in this scenario? Explain the purpose of subnetting.

Q. No. 5
(a) Compare the file systems of Linux and Windows in terms of structure, permissions, and file organization. How do these file systems cater to the needs of diverse computing environments.
(b) How does an operating system mediate between application programs and the computer hardware? Discuss the key roles and responsibilities of an operating system in managing resources.
(c) What is process management in the context of operating systems? How does the operating system handle processes, and what role does it play in multitasking.

SECTION-B

Q. No. 6
(a) Elaborate on the evolution of database systems, highlighting major milestones. Discuss the impact of emerging technologies on the field of database systems.
(b) Write a SQL query involving multiple tables and incorporating JOIN operations. Discuss the potential pitfalls and optimizations related to complex SQL queries.
(c) What are distributed databases, and why are they used? Discuss the advantages and challenges of managing data in a distributed environment.

Q. No. 7
(a) Explain the algorithms used for point detection, line detection, edge detection, and boundary detection in digital images. Discuss the strengths and limitations of these techniques.
(b) Provide detailed explanations and applications of morphological operators like erosion, dilation, opening, closing, skeletonization, and thinning in image processing.
(c) Compare and contrast various image sensing and acquisition techniques. Discuss the advantages and limitations of different methods such as CCD and CMOS.

Q. No. 8
(a) Develop a numerical comparison between client-side functionalities implemented using different JavaScript patterns. Discuss how these patterns impact code maintainability and performance.
(b) Discuss data aspect architectures in web development. How do these architectures address challenges related to data storage, retrieval, and management.
(c) Create a numerical comparison of the efficiency of data exchange using different APIs, such as REST and GraphQL. Discuss the considerations in choosing the appropriate API for a given scenario.