Friday, 12 February 2016

KPSC Lecturer in Computer Science Solved Paper (002/2012) 23-11-2015 - Part 9

81.       A class variable is a variable declared as ……………. inside a class.
(A) const            (B) final
(C) static            (D) extends
Answer: C
82.       ………….. determines the point of time at which a variable comes into existence in memory.
(A) data type     (B) functions
(C) scope          (D) storage class
Answer: D
83.       What does the following program output?
public class ABC
{
public static int function1(int p, int q)
{
if (q==0) return 1;
else if (p<q) return 0;
else
return function1(p-1,q)+function1(p-1,q-1);
}
public static void main(String[] args)
{
System.out.println(ABC.function1(3,2));
}
}
(A) 4                   (B) 3
(C) 2                   (D) 1
Answer: B
84.       The following program prints:
public class XYZ
{
public static void main (String[] args)
{
byte val=(byte) 128;
System.out.println(val);
}
}
(A) -128             (B) 128
(C) 127              (D) -127
Answer:-Question Cancelled
85.       The following Java program segment prints:
String S1=new String("Hello");
String S2=new String("Hello");
if (S1==S2)
System.out.println("They are same");
else
System.out.println("They are not same");
(A) They are same                   (B) They are not same
(C) Garbage                              (D) Run time error
Answer: B
86.       Asynchronous Java Script and XML (Ajax) incorporates
P: Asynchronous data retrieval using XMLHttpRequest
Q: Standards based presentation using XHTML and CSS
R: Data interchanges and manipulation using XML and XSLT
S: Dynamic display and interaction using the Document Object Model
(A) P and R                   (B) P and Q
(C) P, R and S              (D) P, Q, R and S
Answer: D
87.       In Java, MVC stands for
(A) Model Video Controller    (B) Mobile View Controller
(C) Model View Controller     (D) None of the above
Answer: C
88.       Among the following, the Java package which is used by the compiler itself and need not be explicitly imported is:
(A) java.lang                 (B) java.awt
(C) java.math                (D) java.applet
Answer: A
89.       Distributed applications are created in Java using …………..
(A) RMI and JDBC      (B) CORBA and JDBC
(C) RMI and CORBA  (D) None of the above
Answer: C
90.    DMSP stands for:
(A) Distributed Mail Support Plan
(B) Document Management System Protocol
(C) Digital Media Services Protocol
(D) Distributed Mail System Protocol
Answer: D

Wednesday, 10 February 2016

KPSC Lecturer in Computer Science Solved Paper (002/2012) 23-11-2015 - Part 8

71.       Which of the following UML diagram has a static view
(A) Collaboration         (B) Use case
(C) State-chart              (D) Activity
Answer: B
72.       What is the goal of the requirements analysis and specifications phase of the software development life cycle?
(A) Understanding the customer requirements and organize them in an informal document
(B) Determining the scope of the software
(C) Analyzing the cost of the development
(D) none of the above
Answer: A
73.       Which diagram in UML shows a complete or a partial view of the structure of a modeled system at a specific time
(A) Sequence diagram           (B) Collaboration diagram
(C) Class diagram                   (D) Object diagram
Answer: D
74.       SRS document is called a black box specification of a system because
(A) It does not contain the contradictory material
(B) It does not contain the user document
(C) SRS document should specify only the external behavior of the system
(D) none of the above
Answer: C
75.       Which of the following is the structural model that demonstrate the other system in the environment of the system being developed
(A) System context model      (B) Interaction model
(C) Environmental model       (D) Both system context and interaction
Answer: A
76.       In object oriented design of software which of the following is not true
(A) Object inherits the properties of the class
(B) Classes are defined based on the attributes of the object
(C) Objects can belong to two classes
(D) Classes are always different
Answer: C
77.       Quality management in software engineering is also known as
(A) SQA             (B) SQM
(C) SQI              (D) SQA & SQM
Answer: A
78.       Which of the following is not a core step of Six Sigma?
(A) Define                     (B) Control
(C) Measure                 (D) Analyse
Answer: B
79.       According to ISO 9001, inspection and testing comes under which management responsibility
(A) Process control                  (B) Document control
(C) Control of non-conforming products     (D) Servicing
Answer: A
80.    What involves preparing software for external release and keeping track of the system version that have been released for customer use
(A) System building                (B) Release management
(C) change management       (D) Version management
Answer: B

Tuesday, 9 February 2016

KPSC Lecturer in Computer Science Solved Paper (002/2012) 23-11-2015 - Part 7

61.       In the Internet Protocol(IP) suit of protocols, which of the following best describes the purpose of the Address Resolution Protocol?
(A) To translate web addresses to host names
(B) To determine the IP address of a given host name
(C) To determine the hardware address of a given host name
(D) To determine the hardware address of a given IP address
Answer: D
62.       Given the basic ER and relational models, which of the following is incorrect?
(A) An attribute of an entity can have more than one value
(B) An attribute of an entity can be composite
(C) In a row of a relational table, an attribute can have more than one value
(D) In arow of a relational table, an attribute can have exactly one value or a NULL value
Answer: C
63.       If a relation scheme is in BCNF, then it is also in
(A) 1NF              (B) 2NF
(C) 3NF             (D) both (A) and (B)
Answer:-Question Cancelled
64.       Communication circuits that transmit data in both directions but not at the same time are operating in
(A) simplex mode                     (B) half duplex mode
(C) full duplex mode               (D) asynchronous mode
Answer: B
65.       For which one of the following reasons does Internet Protocol(IP) use the time-to-live(TTL) field in the IP datagram header?
(A) Ensure packets reach destination within that time
(B) Discard packets that reach later than that time
(C) Prevent packets from looping indefinitely
(D) Limit the time for which a packet gets queued in intermediate routers
Answer: C
66.       The transport layer protocols used for real time multimedia, file transfer, DNS and email, respectively are
(A) TCP, UDP, UDP and TCP           (B) UDP, TCP, TCP and UDP
(C) UDP, TCP, UDP and TCP           (D) TCP, UDP, TCP and UDP
Answer: C
67.       The normal form that is considered adequate for relational database design is
(A) 2NF              (B) 3NF
(C) 4NF             (D) BCNF
Answer: B
68.       Result of compilation of DDL statement is stored in a special file called as
(A) database file                      (B) symbol table
(C) database schema file       (D) data dictionary
Answer: D
69.       The number of entities to which another entity can be associated via a relationship set is called
(A) Messaging Cardinality     (B) Logical Cardinality
(C) Mapping Cardinality         (D) Data Cardinality
Answer: C
70.    The network topology that supports bidirectional links between each possible node is
(A) Ring             (B) Star
(C) Tree             (D) Mesh
Answer: D

Monday, 8 February 2016

KPSC Lecturer in Computer Science Solved Paper (002/2012) 23-11-2015 - Part 6

51.       What is the minimum number of units of resource R required such that no deadlock will ever occur in an operating system containing 5 user processes each requiring 2 units of R?
(A) 5       (B) 6
(C) 7       (D) 8
Answer: B
52.       The page miss ratio in a paged memory is 0.72. The time required to access a page in primary and secondary memory are 10ns and 100ns, respectively. The average time required to access a page is:
(A) 64.8              (B) 35.2
(C) 74.8             (D) 45.2
Answer: C
53.       The value of a counting semaphore at a particular instance of time is 5. '#' P operations and 16 V operations were completed on this semaphore subsequently. If the final value of the semaphore is 8, then '#' will be
(A) 11                 (B) 12
(C) 16                 (D) 13
Answer: D
54.       Given the following disk queue:
95, 180, 34, 119, 11, 123, 62, 64
with read-write head initially at the track 50 and the tail track being at 199. If C-LOOK disk scheduling algorithm is followed, then the total number of head movement required is:
(A) 157               (B) 146
(C) 187              (D) 236
Answer: A
55.       NTFS stands for
(A) New Type File System
(B) Novel Technology File Service
(C) New Technology File System
(D) New Technology File Service
Answer: C
56.       Shift-reduce parsers are
(A) top-down parsers
(B) bottom-up parsers
(C) both top-down and bottom-up parsers
(D) None of the above
Answer: B
57.       Consider the following grammar:
S→ABSc|Abc
BA→AB
Bb→bb
Ab→ab
Aa→aa
Which of the following sentences can be derived by the above grammar?
(A) aab               (B) abcc
(C) abbc                        (D) abc
Answer: D
58.       Which of the following is an intermediate language?
(A) UNCOL                   (B) PASCAL
(C) COBOL                   (D) SNOBOL
Answer: A
59.       If an input file named "Test" is given to Lex, then its output file will be
(A) Test.lex                    (B) Test.obj
(C) Test.out                   (D) Test.yy.c
Answer: D
60.    The Banker's algorithm is used
(A) to detect deadlock in operating system
(B) to rectify a deadlocked state
(C) to prevent deadlock in operating system
(D) None of the above
Answer: C

Sunday, 7 February 2016

KPSC Lecturer in Computer Science Solved Paper (002/2012) 23-11-2015 - Part 5

41.       Which of the following represents the average-case performance of a quicksort algorithm?
(A) O(n)             (B) O(log n)
(C) O(n/2)          (D) O(nlog n)
Answer: D
42.       Which of the following is not the required condition for binary search algorithm?
(A) The list must be sorted
(B) There should be direct access to the middle element in any sublist
(C) There must be mechanism to delete and/or insert element in list
(D) None of these
Answer: C
43.       A 3-ary tree is a tree in which every internal node has exactly 3 children. The number of leaf nodes in such a tree with 6 internal nodes will be
(A) 10     (B) 23
(C) 17     (D) 13
Answer: D
44.       Of the following sorting algorithms, the one which has a running time that is least dependent on the initial ordering of the input is
(A) Insertion sort          (B) Quick sort
(C) Merge sort              (D) Selection sort
Answer: C
45.       The number of edges in a regular graph of degree d and n vertices is
(A) maximum(n,d)        (B) n+d
(C) nd                            (D) nd/2
Answer: D
46.       The depth of a complete binary tree is given by
(A) n log n                     (B) log n + 1
(C) log n                                    (D) n log n + 1
Answer: B
47.       Convert the expression ((A+B)*C-(D-E)^(F+G)) to equivalent Postfix notation
(A) AB+C*DE--FG+^
(B) AB-C*DE--FG+^
(C) AB+CDE*--FG+^
(D) AB+*CDE--FG+^
Answer: A
48.       Merge sort uses
(A) Divide and Conquer strategy      (B) Backtracking approach
(C) Heuristic search                            (D) Greedy approach
Answer: A
49.       Linked lists are best suited
(A) for relatively permanent collections of data
(B) for the size of the structure and the data in the structure are constantly changing
(C) for both of above situations
(D) for none of above situations
Answer: B
50.    The complexity of the average case of an algorithm is
(A) much more complicated to analyze than that of worst case
(B) much more simpler to analyze than that of worst case
(C) some times more complicated and some other times simpler than that of worst case
(D) none of the above
Answer: A