Friday, March 29, 2024
06:09 PM (GMT +5)

Go Back   CSS Forums > CSS Past Papers > CSS 2018 Papers

Reply Share Thread: Submit Thread to Facebook Facebook     Submit Thread to Twitter Twitter     Submit Thread to Google+ Google+    
 
LinkBack Thread Tools Search this Thread
  #1  
Old Saturday, August 18, 2018
Amna's Avatar
Super Moderator
Moderator: Ribbon awarded to moderators of the forum - Issue reason: Best Moderator Award: Awarded for censoring all swearing and keeping posts in order. - Issue reason: Diligent Service Medal: Awarded upon completion of 5 years of dedicated services and contribution to the community. - Issue reason:
 
Join Date: Aug 2005
Location: Desert of Dream
Posts: 2,926
Thanks: 446
Thanked 1,987 Times in 1,041 Posts
Amna has much to be proud ofAmna has much to be proud ofAmna has much to be proud ofAmna has much to be proud ofAmna has much to be proud ofAmna has much to be proud ofAmna has much to be proud ofAmna has much to be proud of
Default Computer Science Paper-I 2018

FEDERAL PUBLIC SERVICE COMMISSION
COMPETITIVE EXAMINATION - 2018
FOR RECRUITMENT TO POSTS IN BS-17
UNDER THE FEDERAL GOVERNMENT
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

NOTE: (i)
Part-II is to be attempted on the separate Answer Book.
(ii) Attempt ONLY FOUR questions from PART-II by selecting TWO questions from EACH SECTION.
(iii) All the parts (if any) of each Question must be attempted at one place instead of at different places.
(iv) Candidate must write Q. No. in the Answer Book in accordance with Q. No. in the Q.Paper.
(v) No Page/Space be left blank between the answers. All the blank pages of Answer Book must be crossed.
(vi) Extra attempt of any question or any part of the attempted question will not be considered.

PART-II
SECTION-I


Q. 2.
(a) How many layers are in the TCP/IP stack? What are the names? (4)
(b) How digital evidences can be preserved from a crime scene. Write in details by taking examples of digital devices commonly used these days. (4)
(c) What are the responsibilities of Operating system kernel? (3)
(d) List down any four best practices for coding standards. (3)
(e) Why do modern processors use more power when their clock frequency is increased? (2)
(f) Ali is telling Ahmad that he is representing a -ve number and its most significant bit is 1, Ahmad immediately shouted you are representing numbers using 2's compliment. True or False. And why? (2)
(g) If time slice is of 50 milliseconds and context switch requires a microsecond, how many processes can the machine service in a second? (2)

Q. 3. (a) Write a program grade average calculator, User will input marks for five subjects and program will output the average of its marks. Print appropriate message on the base of its mark's average e.g.; Well done, Keep it up, Better luck next time etc.

(b) Given that i,j,k,n & m are integer variables. Write a condition such that:
i- hello is only printed when, any of the following conditions are met: i is twice the value of j, j is smaller than k and less than n, or m is negative.
inti,j,k,n,m; cin>>i>>j>>k>>n>>m;
if(
)
cout<<”hello”;
ii. hello is only printed when i does not lies in the interval 6-9
inti; cin>>i;
if(
)
cout<<
“hello”;
(c) Write equivalent instruction to following instruction without the use of += operator: where w,z are integers.
w+=2*z+4;
(d) Predict the values of variables a & b after every instruction integer a=5 b=6
a=(b++) + 3; b=--a;

(e) Complete the code such that it prompts the user for +ve number n. Then displays the output.(whatever the value of n is)(HINT: instead of triangles of stars its triangles of increasing numbers)[marks]

1 2 3 4 . . . n
1 2 3 4 ..n-1
. . .
. . .
1 2
1

for n=4 it will print
1 2 3 4
1 2 3
1 2
1
void main()
{
int n; cin>>n;

// your loops will go here

}



(f) In following code replace the character at posth location in the string st with the ,character ch. For example in string helloworld replacing 2nd character with i would result in hilloworld

void main( )

{char st[15]; int pos; char ch;
int size=0;
cin>>st;
cin>>pos>>ch;
while(st[size]!='\0')
{
size++; // calculating length of current string
}
// write your code here


}

Q. 4. Consider the inheritance hierarchy shown below. Each part of this question is independent.

[/URL]

(a) In which class(es) would it make most sense to have protected members? Which class(es) would be able to access those protected members directly? (5)

(b) Which class(es) can access private members of class C directly? (5)

(c) Suppose class C contains a pure virtual function. Suppose we wish to instantiate objects of this hierarchy. Which class(es) are or could be abstract and which are concrete? (5)

(d) Consider the following list of classes: Car, SteeringWheel, Vehicle, Van, Minivan, AudioSystem, ParkingLot. Your task is to describe all of the is-a and has-a relationships between these classes. Include an inheritance hierarchy for all classes that fit. Fill in the table with is-a or has-a relationship while leaving the cells empty where no relation is applicable. (5)

[/URL]

SECTION-II


Q. 5.
(a) What is dangling pointer? (3)
(b) What data structure would employ to build a text editor and why? (5)
(c) Random insertion of nodes into a binary search tree would result in what types of tree shape. Elaborate. (7)
(d) How would you modify a link list based queue so that first and last node can be accessed in a constant time regardless of data nodes in the queue? (5)

Q. 6.
(a) Define balanced tree both for AVL and Binary search tree. (4)
(b) What is informed or heuristic search what type of algorithm is used to do such a search? (6)
(c) Differentiate between graph and trees. Which is special case of the other? (5)
(d) Explain what type of problems can be solved by genetic algorithm. (5)

Q. 7.
(a) Outline the difference between software verification and software validation. (4)
(b) Give an outline of the unit testing process for verification. (4)
(c) Agile Development is a process that values responding to change over following a plan. Discuss three issues a Software Engineer should be mindful of when adopting this approach during software development. (4)
(d) What type of project is not suited to incremental methods? (4)
(e) Outline the difference between Black box and White box testing. (4)

Q. 8.
(a) What is the difference between lexers and parsers? (5)
(b) Write a grammar (BNF) for the language of palindromes. (5)
(c) Here DFA is given for the language L find the DFA for L2 (5)



(d) Convert the following DFA to a RE: (5)

__________________
To succeed,look at things not as they are,but as they can be.:)
Reply With Quote
  #2  
Old Friday, October 12, 2018
Junior Member
 
Join Date: Sep 2017
Location: Sweden
Posts: 11
Thanks: 3
Thanked 2 Times in 2 Posts
hs222wx is on a distinguished road
Default Part2?

Where is part 2? Why paper is divided into Paper 1 or Paper2? Each paper occurs at the same time or after one hour break? Please elaborate
Reply With Quote
  #3  
Old Tuesday, October 30, 2018
Junior Member
 
Join Date: Oct 2018
Posts: 11
Thanks: 2
Thanked 1 Time in 1 Post
Zacade is on a distinguished road
Default

Did you solve this paper?
Reply With Quote
  #4  
Old Wednesday, March 13, 2019
Junior Member
 
Join Date: Jan 2019
Location: Layyah
Posts: 15
Thanks: 0
Thanked 2 Times in 2 Posts
AneesTariq is on a distinguished road
Default

Very Tough
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Computer science past paper of SPSC sajidmalik Past Papers 9 Saturday, November 02, 2019 12:07 PM
Revised Syllabus and Recommended Books of Computer Science Amna Computer Science 0 Wednesday, June 03, 2015 04:22 AM
A list of branches of Science and their studies usman malik 65 General Science Notes 0 Tuesday, July 13, 2010 11:23 AM
Philosophy of Science A Rehman Pal Philosophy 0 Sunday, March 18, 2007 03:42 PM


CSS Forum on Facebook Follow CSS Forum on Twitter

Disclaimer: All messages made available as part of this discussion group (including any bulletin boards and chat rooms) and any opinions, advice, statements or other information contained in any messages posted or transmitted by any third party are the responsibility of the author of that message and not of CSSForum.com.pk (unless CSSForum.com.pk is specifically identified as the author of the message). The fact that a particular message is posted on or transmitted using this web site does not mean that CSSForum has endorsed that message in any way or verified the accuracy, completeness or usefulness of any message. We encourage visitors to the forum to report any objectionable message in site feedback. This forum is not monitored 24/7.

Sponsors: ArgusVision   vBulletin, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.