KPK PUBLIC SERVICE COMMISSION, PESHAWAR
COMPUTER SCIENCE
| TIME ALLOWED: 3HOURS | MAXIMUM MARKS: 100 |
Attempt total five questions
Attempt atleast one question from each section
Each question carries 20 Marks
Attempt atleast one question from each section
Each question carries 20 Marks
SECTION-A
| Q.NO.1 (A) | Explain the built-in features of internal architecture of a microprocessor alongwith the Buses. | Marks-10 |
| (B) |
Illustrate the following: Interfacing of 4K*8 bit RAM with 8085 microprocessor. Interfacing of 4K*8 bit ROM with 8085 microprocessor. |
Marks-10 |
| Q.NO.2 (A) |
Explain any two of the following scheduling policies:
|
Marks-10 | |||||||||||||||
| (B) |
Calculate the average waiting time, average turnaround time. Draw the Gantt Chart using FCFS, SJF. Which of the policies provides minimum average waiting time?
|
Marks-10 |
| Q.NO.3 (A) | How ISO’s OSI Seven layers approach of Network architecture is implemented practically? Explain in detail. | Marks-10 |
| (B) |
When choosing a topology, the devices to be linked that may be peer -to- peer or primary-secondary. Which topologies are more convenient for
A Corporation has a fully connected mesh network consisting of 16 devices calculate the total number of cable links needed and the number of ports for each device. |
Marks-10 |
SECTION – B
| Q.NO.4 (A) | Why functions are used in programming? Write the important reasons. Write a function called zerofunction() that is passed two int arguments by reference and then sets the smaller of the two numbers to 0. Write a main () program to exercise this function. |
Marks-10 |
| (B) | What is object oriented programming? Describe Encapsulation, Inheritance and Polymorphism. | Marks-10 |
| Q.NO.5(A) | What is quicksort technique? Sort the given list of items using quicksort technique. List of items: 25, 39, 16, 74, 48, 11, 29, 34. |
Marks-10 |
| (B) | Define Stack and Queue data structures. Write the algorithms for queues and stacks showing insertion and deletion operations. |
Marks-10 |
SECTION – C
| Q.NO.6(A) | What are the advantages of database approach over file based approach? | Marks-10 |
| (B) | How the primary key is deferent from candidate key? What role does it play in maintaining the consistency of a relation? | Marks-10 |
| Q.NO.7(A) |
Create a website about any organization using HTML, DHTML and JavaScript which implement the following:
|
Marks-10 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (B) |
Define the following attributes of <Table> tag: i. Valign ii. Cellpadding iii. CellSpacing iv. Rowspan Implement the following table in HTML. MarkSheet
|
Marks-10 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q.NO.8(A) |
What is Clipping Window? Apply the Polygon Clipping on the following polygon having Vertices P1, P2 and P3. Write each of the steps necessary to implement the polygon Clipping (Show the resultant figures as well).
|
Marks-10 |
| (B) |
Describe the following two dimensional transformation techniques with the help of figures. i. Translation ii. Scaling iii. Rotation |
Marks-10 |
7 Views