Notifications
Clear all

CSS Computer Science Paper 2024

(@zarnishayat)
Member Moderator

FEDERAL PUBLIC SERVICE COMMISSION
COMPETITIVE EXAMINATION FOR RECRUITMENT TO POSTS
IN BPS-17 UNDER THE FEDERAL GOVERNMENT, 2024

 

COMPUTER SCIENCE, PAPER-I

TIME ALLOWED: THREE HOURS

PART-I (MCQS): MAXIMUM 30 MINUTES
PART-I (MCQS) MAXIMUM MARKS: 20
PART-II MAXIMUM MARKS: 80

PART-I — MCQs

Q. 1. Select the best option/answer. (20 × 1 = 20)

  1. Which port is commonly used to connect external devices such as printers, scanners and cameras to a computer?
  2. Which monitor technology provides wide viewing angles and accurate colour reproduction?
  3. Which component supplies power to the other components of a computer system?
  4. Which of the given options is an example of system software?
  5. Which of the following is not an Agile software-development methodology?
  6. Which was the first purely object-oriented programming language?
  7. Which programming language does not support inheritance in all four forms?
  8. Which programming language supports polymorphism but not classes?
  9. Which program is considered the world's first antivirus program?
  10. An administrator should not give a UNIX employee root access unless it is necessary for their job. Which cybersecurity principle does this illustrate?
  11. An online application requiring users to log in again after a period of inactivity is an example of which cybersecurity concept?
  12. Which type of malware does not infect other programs and duplicate itself?
  13. Which class of statement generally produces no executable code when compiled?
  14. What is a compiler called when it runs on one computer but generates code for another?
  15. Which type of error can a compiler detect?
  16. Determine the output of the given C program involving an array access beyond its declared bounds.
  17. Attempting to add an eleventh element to a stack having a capacity of ten results in which condition?
  18. Which statement about binary trees is correct?
  19. What is a linear collection of data elements in which the link between nodes is provided through pointers?
  20. What is the asymptotic time required to add an element to a linked list?

PART-II

NOTE: Attempt ONLY FOUR questions, selecting TWO questions from EACH SECTION. All questions carry equal marks.

SECTION-A

Q. 2

(a) Discuss the future of Information Technology (IT) in Pakistan and its major impact on everyday life. (6)

(b) Explain the differences between a computer virus, Trojan and worm. (6)

(c) Discuss the advantages and disadvantages of LaTeX compared with other document-processing systems. (8)

Q. 3

(a) Write a program that asks the user to enter a letter grade A, B, C, D or F and displays its corresponding numerical value:

  • A = 4
  • B = 3
  • C = 2
  • D = 1
  • F = 0

(6)

(b) Write pseudocode or a C-language program for the mathematical expression provided in the question paper. (6)

(c) Write a version of Breadth First Search (BFS) that calculates the distance from the starting node to every other node instead of returning the actual paths. (8)

Q. 4

(a) Write a program to calculate and display the area and perimeter of a rectangle having:

Width = 4.5
Height = 7.9

Use:

Area = Width × Height

(6)

(b) Write a program that reads a temperature in Celsius, converts it into Fahrenheit, and displays the result.

Fahrenheit = (9/5) × Celsius + 32

(6)

(c) Write a program that asks the user for the month and year and displays the number of days in that month.

For example:

  • Month 2, Year 2024 → February 2024 has 29 days.
  • Month 3, Year 2015 → March 2015 has 31 days.

(8)

SECTION-B

Q. 5

(a) Determine the output of the following Java program:

 
 
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));
}
}
 

(6)

(b) Explain the difference between method overriding and method overloading with suitable pseudocode or a program. (6)

(c) Explain how to prevent a class from being extended and how to prevent a method from being overridden, using simple code examples. (8)

Q. 6

(a) For each of the following datasets, identify 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 uniformly distributed integers
  10. 1 million non-uniformly distributed integers

(8)

(b) Write a recursive binary-search algorithm. Discuss its advantages and disadvantages compared with the non-recursive version. (6)

(c) Write an algorithm for deleting a specified node from a doubly linked list. Also illustrate the deletion process graphically. (6)

Q. 7

(a) Discuss the major phases of project management, including:

  • Conception and initiation
  • Project planning
  • Project execution
  • Performance and monitoring
  • Project closure

(6)

(b) Explain different test-design techniques and discuss when each technique should be used. (6)

(c) Differentiate between:

  • Quality Assurance
  • Quality Control
  • Testing

Give suitable examples. (8)

Q. 8

Write regular expressions for the following. (5 each = 20)

I. Date Format

Examples:

10.03.2024
12/30/2023
01/01/2022

II. URL

Example:

http://example.edu.pk

III. IP Address

Example:

192.168.0.1

IV. Email Address

Example:

abc@example.com

COMPUTER SCIENCE — PAPER-II

COMPUTER SCIENCE, PAPER-II

TIME ALLOWED: THREE HOURS

PART-I (MCQS): MAXIMUM 30 MINUTES

PART-I (MCQS) MAXIMUM MARKS: 20

PART-II MAXIMUM MARKS: 80

PART-I — MCQs

Q. 1

  1. Which architecture is different from the conventional von Neumann architecture?
  2. A computer is in system mode when what condition exists?
  3. What is the effect of storing data contiguously in memory?
  4. How can network traffic estimation be performed?
  5. What is the time complexity of finding a shortest path in a network, considering algorithms such as Dijkstra's and A*?
  6. Which encoding is most efficient for sending data through networks?
  7. Compare time slicing and time sharing.
  8. Which types of algorithms can be applied to scheduling resources in operating systems?
  9. Which statements about operating systems and low-level machine details are correct?
  10. In RISC architecture, which registers are updated when a function is called?
  11. What is meant by a child entity in an ER diagram?
  12. What condition does Boyce-Codd Normal Form (BCNF) ensure?
  13. What is DDL used for?
  14. What does dynamic range mean in image processing?
  15. Which statement correctly describes brightness, saturation and hue?
  16. What is SIFT used for?
  17. Can Optical Character Recognition (OCR) be performed using deterministic algorithms?
  18. Which statements about PHP's echo and print are correct?
  19. What is a characteristic of the Wiener filter?
  20. Which PHP facility allows dynamic code execution?
PART-II
SECTION-A

Q. 2

(a) Explain why multiprocessor systems are advantageous in computer architecture. Discuss how parallel processing improves system performance and scalability. (7)

(b) Explain how the choice of architectural level affects computer-system performance. Provide a numerical comparison between two architectural levels and highlight their strengths and weaknesses. (7)

(c) A processor executes 1 billion instructions per second and requires 4 cycles per instruction. Calculate the overall execution time for a program containing 1 million instructions. Also discuss the effect of reducing cycles per instruction. (6)

Q. 3

(a) Explain why cache memory is a critical component of a computer system. Discuss how internal and external data representation helps optimize memory usage and system efficiency. (7)

(b) Explain parallelism in computer architecture and discuss how the internal structure of a microprocessor enables parallel processing. (7)

(c) Explain the stages of the instruction execution cycle. Discuss how CISC and RISC architectures affect this cycle. (6)

Q. 4

(a) Compare the OSI and TCP/IP models in terms of simplicity and practicality. Explain why a layered approach is useful in network design. (7)

(b) Explain how overlay networks and Content Distribution Networks (CDNs) improve Internet performance and scalability. Include a numerical example showing their effect on content delivery. (7)

(c) Explain IP addressing using a city/street-address analogy. Then explain the purpose of subnetting using a neighborhood analogy. (6)

Q. 5

(a) Compare UNIX and Windows file systems in terms of structure, permissions and file organization. Explain how each accommodates different computing environments. (7)

(b) Explain how an operating system mediates between application programs and computer hardware. Discuss its major responsibilities in resource management. (7)

(c) Define process management in an operating system. Explain how processes are handled and how process management enables multitasking. (6)

SECTION-B

Q. 6

(a) Explain the evolution of database systems, highlighting major milestones and discussing the impact of emerging technologies on modern databases. (7)

(b) Write an SQL query involving multiple tables and JOIN operations. Discuss possible problems and optimization techniques associated with complex SQL queries. (7)

(c) Define distributed databases and explain why they are used. Discuss their advantages and challenges. (6)

Q. 7

(a) Explain algorithms used for:

  • Point detection
  • Line detection
  • Edge detection
  • Boundary detection

Discuss the strengths and limitations of these techniques in digital image processing. (7)

(b) Explain the following morphological operations and their applications:

  • Erosion
  • Dilation
  • Opening
  • Closing
  • Skeletonization
  • Thinning

(7)

(c) Compare different image-sensing and acquisition techniques. Discuss the advantages and limitations of CCD and CMOS technologies. (6)

Q. 8

(a) Develop a numerical comparison of client-side functionality implemented using different JavaScript patterns. Discuss their effects on code maintainability and performance. (7)

(b) Discuss data-aspect architectures in web development and explain how they address data storage, retrieval and management challenges. (7)

(c) Compare the efficiency of data exchange using APIs such as REST and GraphQL. Discuss factors that should be considered when selecting an API for a particular scenario. (6)


DOWNLOAD NOW


Quote
Topic starter Posted : August 15, 2026 12:07 pm
Share: