Computer Science Punjab PMS Paper I 2019

PUNJAB PUBLIC SERVICE COMMISSION
COMBINED COMPETITIVE EXAMINATION FOR
RECRUITMENT TO THE POSTS OF
PROVINCIAL MANAGEMENT SERVICE – 2019
SUBJECT: COMPUTER SCIENCE (PAPER – I )
TIME ALLOWED: THREE HOURS MAXIMUM MARKS: 100
NOTE: Attempt Any FIVE Questions in All, Please attempt AT LEAST 1 Question from each Section

SECTION – A

Q No. 1: 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 application, explain with the help of an example? (10 + 5 + 5 = 20 Marks)

Q No. 2: a) Prime number is a number that is completely divided by itself or by 1, e.g. 3, 5, 9 are primer 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 that needs 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 the employees. We also need to generated invoices (bills) for ail the transactions where we need to store the items purchased, quantity of an 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 dasses from your identified classes. (10 + 10 = 20 Marks)

SECTION B

Q No. 3: a) What is the meant by parity bit?
b) Draw the XOR & XNOR Gates.
c) Simplify the Boolean function using k-map and draw the circuit diagram. Fx(, Y,z) = E(1,3,5,6,7)
d) Design a full adder circuit with the two half adders. Draw block & circuit diagram and truth table. (2 + 2 + 6 + 10 = 20 Marks)

Q No.4: a) Define OSI model and explain the functioning of each layer in OSI model.
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.5: a) Explain the following connecting devices:
i) Passive hub ii) Repeater iii) Bridge iv) Router v) Gateway

b) What is difference between Combinational logic & 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 is employing Agile Software Development Process. Scrum is one of the widely used processes for agile software development. Please 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 Semaphore? How is it useful in the working of an Operating System?
b) Explain the concept of Page Fault and the situations in which page fault occurs.
c) What is the concept of Virtual Memory, and how does it increase the performance of an operating system?
d) Graph is one of the most widely used application data structure for real life problems. Discuss two real life scenarios where Graph is the best suitable data structure. (4 x 5 = 20 Marks)

Q No.8: a) What is the complexity of the following algorithms?
i) Quick Sort ii) Bubble Sort ii) Binary Search iv) Graph Traversal v) Heap Sort
b) What are two main advantages of Block Chain 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 x 5 = 20 Marks)


1,210 Views