KPSC Sa-P 2019
KPSC Sa-P 2019
The jobs are assumed to have arrived at time 0 and in the order P1, P2, P3, P4, P5. Calculate the departure completion time
for job P1 if scheduling is round robin with time slice 1.
A:-4
B:-10
C:-12
D:-11
Correct Answer:- Option-D
Question34:-The Banker's algorithm is used
A:-To prevent deadlock in operating systems
B:-To detect deadlock in operating systems
C:-To avoid deadlock in operating systems
D:-All of the above
Correct Answer:- Option-C
Question35:-The performance of a digital computer improves when its RAM size increases. This is because
A:-Size of virtual memory increases
B:-Number of page faults are less
C:-Larger RAMS are very faster
D:-Number of segment faults are less
Correct Answer:- Option-B
Question36:-Multiplier Quotient register is placed in
A:-Main Memory
B:-CPU
C:-I/O Equipment
D:-None of these
Correct Answer:- Option-B
Question37:-Which of the following is/are not true in contiguous allocation of disk space
A:-Size of the file is to be declared in advance
B:-There is no external fragmentation
C:-Difficulty in finding space for a new file
D:-Both 2 and 3
Correct Answer:- Option-B
Question38:-Interrupt latency for real time OS should be
A:-Maximum
B:-Zero
C:-Minimal
D:-None of the above
Correct Answer:- Option-C
Question39:-Which of the following is an invalid shell variables?
A:-india_15
B:-_15_india
C:-15_india
D:-Both 2 and 3
Correct Answer:- Option-C
Question40:-The output of the following shell programming is
var_1 = good
Readonly var_1
var_1= morning
echo $var_1
exit 0
A:-good
B:-morning
C:-program will generate an error message
D:-none of the above
Correct Answer:- Option-A
Question41:-The time complexity of building a heap with 'n' elements is
A:-O(n)
B:-O(log n)
C:-`O(n^2)`
D:-O(n log n)
Correct Answer:- Option-A
Question42:-Which of the following is false regarding AVL trees?
A:-AVL tree is more balanced than binary search tree
B:-AVL tree is more space efficient than binary search tree
C:-AVL tree is more time efficient than binary search tree
D:-None of the above
Correct Answer:- Option-B
Question43:-What is the worst case complexity of quicksort?
A:-O(n log n)
B:-O(n)
C:-`O(n^2)`
D:-O(log n)
Correct Answer:- Option-C
Question44:-Which data structure can be used to efficiently implement dijkstra's algorithm?
A:-Double ended queue
B:-Priority queue
C:-Stack
D:-Binary search tree
Correct Answer:- Option-B
Question45:-Which data structure is well suited for separate chaining?
A:-Singly linked list
B:-Doubly linked list
C:-Circular linked list
D:-Binary trees
Correct Answer:- Option-B
Question46:-In the following code, how many times the program will print "Hello"?
#include<stdio.h>
int main()
{
printf("Hello");
main();
return 0;
}
A:-Infinite times
B:-32767 times
C:-65535 times
D:-till stack overflows
Correct Answer:- Option-D
Question47:-What will be output if you will compile and execute the following c code?
#include "string.h"
void main()
{
printf("%d%d",sizeof("program"),strlen("program"));
getch();
}
A:-8 7
B:-7 8
C:-8 8
D:-7 7
Correct Answer:- Option-A
Question48:-Predict the outputs of following C program.
int main()
{
int x = -20;
while (x++ !=1);
printf("%d", x);
return 0;
}
A:-2
B:-1
C:--1
D:-infinite
Correct Answer:- Option-A
Question49:-What is the return type of malloc()?
A:-void*
B:-pointer of allocated memory type
C:-void**
D:-int*
Correct Answer:- Option-A
Question50:-What does the following declaration mean?
int (*ptr)[20];
A:-ptr is array of pointers to 20 integers
B:-ptr is a pointer to an array of 20 integers
C:-ptr is an array of 20 integers
D:-None of these
Correct Answer:- Option-B
Question51:-If class C is derived from another class B which is derived from class A, which class will have minimum level of
abstraction?
A:-Class A
B:-Class B
C:-Class C
D:-All have same level of abstraction
Correct Answer:- Option-C
Question52:-Which of the following statement is false?
A:-An abstract class is a class which cannot be instantiated
B:-Creation of an object is not possible with abstract class but it can be inherited
C:-An abstract class can contain only Abstract method
D:-None of these
Correct Answer:- Option-D
Question53:-Which is the necessary condition for virtual function to achieve late binding?
A:-Virtual function is to be accessed with direct name
B:-Virtual functions is to be accessed using base class object only
C:-Virtual function is to be accessed using pointer or reference
D:-Virtual function is to be accessed using derived class object only
Correct Answer:- Option-C
Question54:-Operator overloading is
A:-Making c++ operator works with objects
B:-Giving new meaning to existing operator
C:-Adding operation to the existing operators
D:-All the above
Correct Answer:- Option-C
Question55:-What are all the operators that cannot be overloaded?
A:-Scope Resolution (::)
B:-Member Selection (.)
C:-New operator (new)
D:-Both 1 and 2
Correct Answer:- Option-D
Question56:-Which two of the following methods are defined in class Thread?
A:-Start and wait
B:-Start and run
C:-Wait and notify
D:-Start Only
Correct Answer:- Option-B
Question57:-Which of these class object cannot be used to form a dynamic array in JAVA?
A:-ArrayList
B:-Map
C:-Vector
D:-ArrayList and Vector
Correct Answer:- Option-B
Question58:-Predict the output of the following code
X Y Z
x1 y1 z1
x2 y1 z1
x3 y2 z1
i. When a TCP sender calls close(), the network stack immediately sends a FIN packet to its peer
ii. send() on a TCP socket causes a sender to a generate a TCP/IP packet and send it out the appropriate network interface
iii. accept() returns when the receiver completes the three-way TCP handshake
iv. The return value of recv() specifies the number of bytes read from a socket, or if the socket was closed or an error was
encountered
A:-i only
B:-i and ii
C:-iii and iv
D:-iv only
Correct Answer:- Option-C
Question91:-COCOMO stands for
A:-Consumed Cost Model
B:-Constructive Cost Model
C:-Common Control Model
D:-Composition Cost Model
Correct Answer:- Option-B
Question92:-Which of the following is not defined in a good Software Requirement Specification (SRS) document?
A:-Functional Requirement
B:-Nonfunctional Requirement
C:-Goals of implementation
D:-Algorithm for software implementation
Correct Answer:- Option-D
Question93:-Software process and improvement are assessed by
A:-ISO 9000
B:-ISO 9001
C:-SPICE (ISO/IEC15504)
D:-Both 2 and 3
Correct Answer:- Option-D
Question94:-CMM model in Software Engineering is a technique of
A:-Develop the software
B:-Improve the software process
C:-Improve the testing process
D:-All of the above
Correct Answer:- Option-B
Question95:-Alpha and Beta Testing are forms of
A:-Acceptance testing
B:-Integration testing
C:-System testing
D:-Unit testing
Correct Answer:- Option-A
Question96:-Coupling and cohesion can be represented using a
A:-cause-effect graph
B:-dependence matrix
C:-structure chart
D:-SRS
Correct Answer:- Option-B
Question97:-The tests that run every night during the project development or before a programmer checks in any changes
to the global repository are normally characterized as
A:-Integration tests
B:-Regression tests
C:-Validation tests
D:-System tests
Correct Answer:- Option-B
Question98:-Which of the following reason is valid ones for choosing a top-down process?
A:-Developers can present a demo of the project to the management faster than using a bottom-up process
B:-A top-down process is more time consuming because of the unit tests
C:-In a top-down design, if an error is detected its always because a lower-level module is not meeting its specifications
(because the higher-level ones are already been tested)
D:-A top-down process makes it possible to detect performance problems faster
Correct Answer:- Option-A
Question99:-Consider the following statements
(i) Bottom-up testing is not an effective way to reveal architectural design flaws.
(ii) Top-down testing can be time-consuming, because you need to write stubs for many modules.
A:-Only (i) is true
B:-Only (ii) is true
C:-Both (i) and (ii) are true
D:-Both (i) and (ii) are false
Correct Answer:- Option-C
Question100:-Consider the following statements
(i) When designing tests, if partitions are chosen perfectly, there is no point to testing boundary values near the edges of
the partition.
(ii) Glass-box tests designed for one implementation are valid to use when testing another implementation.
A:-Only (i) is true
B:-Only (ii) is true
C:-Both (i) and (ii) are true
D:-Both (i) and (ii) are false
Correct Answer:- Option-C