PMS Computer Science Past Paper 2019 PDF

PUNJAB PUBLIC SERVICE COMMISSION

Combined Competitive Examination (CCE) 2019

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

a) Write an algorithm to find an element from a sorted array A[] consisting of N elements using binary search.
b) Convert 9948 into Binary, Octal, and Hexadecimal representations.
c) What is the difference between Thin Client and Thick Client applications? Explain with the help of an example.
(10+5+5 = 20 Marks)

a) A prime number is a number that is completely divisible by itself or by 1, e.g., 3, 5, 9 are prime numbers. You are supposed to write a function in C++ or Java to find if an input number is prime or not. Use the following signature:
bool isPrime(int number)
b) We need to build a software system to manage the data of a departmental store where we sell many items. Each item has a name, id, and price. The system should store the name, id, date of birth, joining date, and salary of all employees. We also need to generate invoices (bills) for all transactions where we store the items purchased, quantity of each item, and the record of the employee who generated that invoice.
i) Identify the classes and their attributes that will be used in this scenario.
ii) Extract one example of composition of classes from your identified classes.
(10+10 = 20 Marks)

SECTION – B

a) What is meant by parity bit?
b) Draw the XOR and XNOR gates.
c) Simplify the Boolean function using K-map and draw the circuit diagram:
F(x, y, z) = Σ(1, 3, 5, 6, 7)
d) Design a full adder circuit using two half adders. Draw block diagram, circuit diagram, and truth table.
(2+2+6+10 = 20 Marks)

a) Define OSI model and explain the functioning of each layer.
b) Define HDLC. Explain different frame formats with control field used by HDLC.
c) What are the characteristics of Fast Ethernet?
(10+7+3 = 20 Marks)

Q. No. 4
a) Explain the following connecting devices:
i) Passive Hub
ii) Repeater
iii) Bridge
iv) Router
v) Gateway
b) What is the difference between combinational logic and sequential logic? Explain with diagram.
c) What are the differences between TCP and UDP header formats?
(10+5+5 = 20 Marks)

SECTION – C

Q. No. 6
a) Recent software development employs Agile Software Development Process. Scrum is one of the widely used processes for agile software development. Explain the Scrum methodology in detail.
b) Write an algorithm for a function
void addNodeSorted(int data)
that adds a new node in a sorted linked list so that the list remains sorted.
(10+10 = 20 Marks)

Q. No. 7
a) What is a Semaphore? How is it useful in the working of an Operating System?
b) Explain the concept of Page Fault and the situations in which it occurs.
c) What is Virtual Memory, and how does it increase the performance of an operating system?
d) Graph is one of the most widely used data structures. Discuss two real-life scenarios where graph is the most suitable data structure.

Q. No. 8
a) What is the complexity of the following algorithms?
i) Quick Sort
ii) Bubble Sort
iii) Binary Search
iv) Graph Traversal
v) Heap Sort
b) What are the two main advantages of Blockchain Technology?
c) Write a function
void searchElement(int data)
to find a data element in a Binary Search Tree.
d) What are the main components of a compiler?
(4×5 = 20 Marks)

SUBJECT: Commerce (Paper-II)

Time Allowed: 3 Hours

Maximum Marks: 100


Attempt FIVE questions in all. Calculator is allowed (non-programmable).

Q. No. 1
a) What are regular expressions in a language and how can they be built? Explain their benefits with the help of two suitable examples.
b) Define the following terms for Context Free Grammar (CFG):
  • Parse Trees
  • Ambiguous Grammars
  • Leftmost and Rightmost Derivations
  • Document Type Definitions (DTD)
c) Enlist any three programming techniques in Turing Machines. Explain any two with examples.
(10+5+5 = 20 Marks)

Q. No. 2
a) Find parse trees, leftmost and rightmost derivations for each of the following:
i) (b,b)
ii) (b,(b,b))
iii) (b,((b,b),(b,b)))
b) What is a code generator in compilers? Draw its position and explain issues of code generation with suitable examples.
(12+8 = 20 Marks)

Q. No. 3
a) What are the advantages and disadvantages of a multi-pass compiler compared to a one-pass compiler?
b) Discuss issues related to memory management and instruction selection in the design of a code generator.
(10+10 = 20 Marks)

Q. No. 4
a) Differentiate between Raster Scanning and Random Scanning techniques.
b) What is meant by Clipping? Explain any one clipping algorithm.
(10+10 = 20 Marks)

Q. No. 5
a) Describe advantages and disadvantages of SQL in relational databases with examples.
b) What is Normalization in databases? Explain two approaches to convert an Unnormalized Form (UNF) table into First and Second Normal Forms (1NF & 2NF) with examples.
(10+10 = 20 Marks)

Q. No. 6
a) Describe various CPU scheduling algorithms with suitable examples.
b) Explain the structure of a Distributed Operating System and its advantages.
(10+10 = 20 Marks)

Q. No. 7
a) Define Testing and explain the difference between White Box Testing and Black Box Testing.
b) Describe the role of Risk Analysis in an evolutionary process model like the Spiral Model.
(10+10 = 20 Marks)

Q. No. 8
a) Differentiate between:
i) Strong AI and Weak AI
ii) Supervised and Unsupervised Learning
b) Use the trapezoidal rule to numerically integrate f(x) from a = 0 to b = 2, where:
f(x) = 0.2 + 25x + 3x²
Also compute Relative Error.
(10+10 = 20 Marks)

Leave a Reply

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