PMS Computer Science Past Paper 2020 PDF

PUNJAB PUBLIC SERVICE COMMISSION

Combined Competitive Examination (CCE) 2020

For Recruitment to the Posts of Provincial Management Service (PMS)


SUBJECT: Computer Science (Paper-1)

Time Allowed: 3 Hours

Maximum Marks: 100

Attempt any FIVE questions in all. Attempt at least ONE question from each section.

SECTION – A

Q. No. 1
a) Convert the following octal number into equivalent decimal, hexadecimal, and binary forms:
(64.12)₈
b) Prove that the following proposition is a tautology using a truth table:
¬(p ∧ (p ∨ q)) → q
(12 + 8 = 20 Marks)

Q. No. 2
Write a function in C/C++ that takes two integer arguments in the range [0–999]. The function calculates the sum of individual digits in each integer number and returns the integer whose digit sum is greater than the other. If both sums are equal, return the first integer.
For example, the sum of digits of 219 is 2 + 1 + 9 = 12.
Use the following signature:
int greater_sum(int n1, int n2)

Q. No. 3
We have conducted a 5-mark quiz in a class of 300 students. Each student’s marks are in the set {0, 1, 2, 3, 4, 5}. Write a function in C/C++ that takes an unsorted list of obtained marks and returns the mark with the highest frequency.
For example, if:
20 students got 0, 75 got 1, 40 got 2, 90 got 3, 60 got 4, and 15 got 5,
then the function should return 3, as it has the highest frequency.
Use the following signature:
int marks_mode(int marks[], int n)
(20 Marks)

SECTION – B

Q. No. 4
Determine the latency (from first bit sent to last bit received) for each case:
i) 100-Mbps Ethernet with a single store-and-forward switch in the path and a packet size of 16,000 bits. Assume each link introduces a propagation delay of 6 µs, and the switch begins retransmitting immediately after receiving the full packet.
ii) Same as (i), but with three switches.
iii) Same as (i), but assume the switch uses cut-through switching and can begin retransmitting after receiving the first 100 bits.
(8 + 5 + 7 = 20 Marks)

Q. No. 5
A company is assigned the prefix 213.8.8.0/24. We need to create subnets for the following departments:
Department No. of Hosts

A

90

B

30

C

25

D

20

i) Give a possible arrangement of subnets by specifying subnet numbers and subnet masks for each subnet.
ii) If the number of hosts in department A grows to 150, what will be the new subnet arrangement?
(15 + 5 = 20 Marks)

Q. No. 6
a) Perform the following binary multiplication (unsigned):
11011 × 1010
b) Perform the following binary division (unsigned):
11110 ÷ 110
c) Perform the following binary subtraction (signed numbers):
01011101 − 01001101
(6 + 6 + 8 = 20 Marks)

SECTION – C

Q. No. 7
Write the algorithm of insertion sort. Also show the step-by-step operation of insertion sort on the following array:
12, 9, 11, 13, 8, 10
(10 + 10 = 20 Marks)

Q. No. 8
a) Differentiate between short-term, medium-term, and long-term scheduling.
b) Differentiate between user-level threads and kernel-level threads. Also discuss pros and cons of each.
c) Differentiate between preemptive and non-preemptive scheduling.
d) How do the following scheduling algorithms treat short jobs?
i) FCFS
ii) Round Robin
iii) Multilevel Feedback Queues
(6 + 6 + 2 + 6 = 20 Marks)

SUBJECT: Commerce (Paper-II)

Time Allowed: 3 Hours

Maximum Marks: 100


Note: Attempt any FIVE questions.

Q. No. 1
a) Discuss third normal form and explain transitive dependency with a real example.
b) Discuss Internet of Things (IoT) with a simple example, especially in agriculture.
c) Define wireless sensor networks and explain their use in healthcare systems with an example.
d) Differentiate between two-tier architecture and three-tier architecture.
(4 × 5 = 20 Marks)

Q. No. 2
a) Write a method in C++ or Java to calculate power of a number. Input should be n and p, and output n^p.
Prototype:
int power(int n, int p);
b) Write a function to find the second largest element in an integer array.
Prototype:
int secondlargest(int array[], int size);
(2 × 10 = 20 Marks)

Q. No. 3
a) Differentiate between unit testing and integration testing.
b) Explain low coupling and high cohesion with an example system.
c) For Facebook-like system, choose a suitable data structure for friendship management and justify.
d) When do binary search trees exhibit O(n) performance instead of O(log n)?
(4 × 5 = 20 Marks)

Q. No. 4
Give short answers:
a) Differentiate between Time Division Multiplexing and Frequency Division Multiplexing.
b) What is 5G technology? Give one application.
c) How do data centers handle system failure and unavailability? Discuss pros and cons.
d) Difference between IPv4 and IPv6 and its role in IoT.
(4 × 5 = 20 Marks)

Q. No. 5
a) Find Minimum Spanning Tree using Kruskal’s algorithm. Show edge selection order.
b) Give prefix, postfix, and infix expressions for the given tree.
(2 × 10 = 20 Marks)

Q. No. 6
i) Arrange memory hierarchy: RAM, Hard Disk, Cache, Register, Tape Storage.
ii) Explain semaphore and its use in concurrency.
iii) Differentiate between process and thread.
iv) Explain thrashing in operating systems.
v) Advantages of stored procedures in large systems.
(5 × 4 = 20 Marks)

Q. No. 7
a) Explain microservices architecture.
b) Write code with O(log n) complexity.
c) Difference between high-level and low-level languages.
d) DFA vs NFA with example.
(4 × 5 = 20 Marks)

Q. No. 8
a) Explain insertion, deletion, and update anomalies with examples.
b) Discuss scalability issues in a large social media database design (Facebook model).

 

Leave a Reply

Your email address will not be published. Required fields are marked *