2017 Test Ajk PSC
2017 Test Ajk PSC
2017 Test Ajk PSC
a) 4
b) 2 d) 8
Question No.16. A block of memory is allocated using new operator in the free store, and the_________is
returned by new
a) Value c) Object
Address of the reserved memory block d) All of above
Question No.19. Which is called the specialized member function of a class that cannot be overloaded?
a) Constructor c) Destructor
b) Setter functions d) Friend functions
Question No.20. Which of the following is true for constructors,
a) A class can havo only one constructor method — - -
b) A constructor must be declared tor each Gass.
c) Every parameterized constructor is default constructor
d) Default argument constructor and parameterized constructor can be declared for the same class
simultaneously
Question No.21. Which of the following options the compiler would reject for the following the C++ declaration?
class A
public: int x;
proteded: int y;
d)
--3—
NodeType . p;
NodeType . q;
p = new NodeType, p-
>data = 12;
p->next = NULL;
q = new NodeType; q-
>data = 5;
q->next = p;
Which of the following expressions has the value NULL?
a) p c) q->next
b) q d) q->next->next
Question 610.28. Ina circular queue we can disambiguate empty from full queues by
a)Using a gap in the array
b ) I nc rem enti ng queue positions by 2 instead of 1
c ) Keeping a count of the number of elements
d)a a n d c
Question No.29. Suppose we have en empty stack of integers and an empty queue of integers to begin
with, what will the following code fragment print?
for (i = 0; i< 50; i+-9 stackPush(i),
for (i = 0; i< 50; i++) queuePut(stackPop());
for (i = 0; i< 50; ice) stackPush(queueGet());
for (i = 0; i< 50; i++) cout<<stackPop();
a)1,2,3...99 c) 0,1,2..50,49,48....0
b ) 99,98,97_, d) 0,1,2,3,...,99.
Question No.30. Which option would be the best one for implementing
"Email is forwarded to your inbcx as it arrives. You want the ability to read the messages in the order, chosen
by you."
a) Queue c) Linked lists
• b) Stack d) Trees
Question No.31. One can convert a Unary tree into its mirror image by traversing it in
a) lnorder c) Postorder
5) Preorder d) Any order
Question No.32. What is the minimum possible number cf children fcr a node in a Binary Tree,
a) 2 cs,
b) 3 d) Cannot be known in advance
Queption No.33. A is a device that forwards packets between networks by processing thouting
information included in the packet
a) Bridge c) Router
b) Firewall d) All of the mentioned
Question No.34. Which one of the following is not 2 function of network layer?
a)Routing c) Congestion control
b ) Forwarding d) None of the mentioned
Question No.35. The IPv4 address consists of
a)Network address c) Both (a) and (b)
b)Nest address ti) None of the mentioned
—4 —
Question No.36. ICMP is primarily used for
a) Error and diagnostic functions c) Forwarding
b) A d d r e s s i n g d) Encryption
Question No.37. Transport layer aggregates data frorn different applications into a single stream before
passing it to
a) Network layer c) Application layer
b ) Data link layer d) Physical layer
Question No.38. When 2 or more bits in a data unit has been changed during the transmission, the
error is called
a) Random error c) Inverted error
b) Burst eiror d) None of the above
Question No.39. This is not an application layer protocol
a)HTTP c) SMTP
b ) FTP d) TCP
Question No.40. The function came into being as the result of the implementation model for undo
a)Redo c) Repeat
b)Undo d) Delete
Question No.41. The CPU busy-waits reading the status register of an I/O device
in
a)Interrupt Driven I/0 operation c) Programmed I/O operation
b)Direct Memory Access (DMA) operation d) All of the above
Question No.42. The activity of concurrent execution ot multiple programs on multiple processors is called
as:
a)Multiprogramming c) Multithreading
b)Multiprocessing d) Multitasking
Question No.43. One of the necessary condition for a deadlock to happens
a) Mutual Exclusion c) No Preemption
b) hlold and Wait d) All of the above
Question No... A misbehaving system component can be easily killed at runtime in a
a)Microkemel OS - _ M,nolithic OS
b)L a y e r e d O S d) All of the above
Question No.45. Larger jobs may go into starvation in the case of
a) Shortest Job First (SJF) c) Round Robin (RR)
b) First Come First Serve (FCFS) d) All of the above
Question No.46. Banker's algorithm is a
a) Deadlock detection algorithm c) Deadlock prevention algorithm
d) None of the above
b) Deadlock avoidance algorithm
Question No.47. Consider three compute bound processes with 10, 20 and 30 units of burst time. Let us
assume that these processes arrive at 0, 2 and 6 units of time respectively. For the Shortest Remaining
Time First (SRTF), how many context switches are needed? Do not consider the context switches
at the time 0 and at the end.
a) 4 c) 2
b) 3 d) 1
Question No.48. The capacity of a memory unit is defined by the number of words rnultiplied by the
nurnber of bits/word. How rnany separate address and data lines are needed for a memory of 4K x
16?
c) 12 address. 16 data tines
a) 10 atdress. 16 data lines
b) 1 address, 8 data lines d) 12 address. 12 data fines
1
Question No.49. Concepts that describe the details of how data is stored on the computer storage
media aregivenConceptual data modelsby?
c) Representational data models
a )
b) Physical data models d) None of the above
Question No.50. The description of a database such as data-types, constraints etc, a known as:
a)Database Schema c) Dbase St
dc))Npoengata eofeothfaale
e .0i:en ship
b ) Database Instance
Question No.51. The number of participating entity types in a relationship (in databases) is known as?
a) Relationship Instance
d) None of the above
b) Relationship Type
—5--
Question No.52. SQL does not automatically eliminate duplicate tufts in the results of queries because
a)Duplicate elimination Is expensive
b)Users may want duplicates
c)Aggregate functions ignore the duplicate values
d)None of the above Question No.53. What is true for DISTINCT qualifier
in SELECT statements
a)DISTINCT is used to return the duplicate rows in the result set
b)It immediately follows WHERE keyword
c)DISTINCT is the default mode of the displaying result set for SQL queries
d)You can specify multiple columns after DISTINCT qualifier
Question No.54. Which operation in relational algebra selects certain columns from the table and discards
the other column.
a)PROJECT c) UNION
b)SELECT d) INTERSECT
Question No.55. Which of the following statements is NOT TRUE about weak entities?
a)A weak entity type always has a total participation constraint with respect to its identifying relationship
b)A weak entity always participates in a non-identifying relationship
c)A weak entity type has a partial key
d)None of the above Question No.56. The correct SQL statement to check all employees whose
name end on letter T is:
a)Select Ename From Employee Where Ename LIKE ___ T
b)Select EnameFrom Employee Where Ename LIKE %T_;
c)Select EnameFrom Employee Where Ename LIKE .%T%.,
d)Select EnameFrom Employee Where Ename LIKE '%T'; Question No.57.
Which factors can be improved in pipelined architecture?
a)Throughput c) Clock
b)Latency d) Both a & b
Question No.58. Which cache mapping technique can give fastest access time:
a)Set Associative c) Direct
b)Full Associative d) All of the above
Question No.59. If Clock = 3.3 KHz, the maximum number of single cycle instruction 8051 can execute in
1 second is
at 2750 inst. c) 1650 inst.
b) 2350 inst. d) None of the above
Question No.60. Stack access belongs to
a) Spatial locality c) Random access
b) Temporal locality d) Both a & b
Question No.61. For a 2 Kbyte cache design, miss rate = 30%, Hit cost = 4 cycles and Miss cost = 20
cycles. The average cost of memory access is;
a) 3.5 cycles c) 8.8 cycles
b ) 4.7 cycles d) 5.2 cycles
Question No.62. In a 5 stage pipetined structure, how many cycles are required to complete 5
instructions?
a)25 cycles c) 9 cycles
b) 1 5 c y c l e s d) 5 cycles
Question No.63. Cache is
a) Non volatile c) Read only
b) Volatile d) Both b and c
Question No.64. In the following instructions what type of data dependency exists,
ADD R1 R2 R3
SUB R4 R2 R1 WAR
a) RAW e) Non of the mentioned
RAR d)
—5—
—6—
Question No.73. The minimum number of cards to be dealt from an arbitrarily shuffled deck of 52 cards to
guarantee that three cards are from some same suit is?
a) 8 c) 3
b) 9 d) 12
Question No.74. List the following function growth rates in order of increasing complexity.
1o92(n), 2", n2, logio(n), where n is the size of the Input
a) Logio(n), 1o92(0), ri2. 2"
b)Log2(n). 10910(n), n2, 2n
L.92(n), 1.9100). 2° . n2 d) None of above
Question No.75. Theta A notation expresses the
a) Lower bound of a function c) Both a and b
b) Upper bound of a function d) None of the mentioned
Question No.76. Finding the largest item stored in an array of sae n, the growth function is
a) 0(n) c) 0(n2)
b ) 0(nlog n) d) 0(log n)
Question No.77. Worst case for Insertion sort is 0(n2) when n elements are
a) Reverse sorted or der c) Random order
b) Already sorted order d) None of the mentioned
-7-
Question No.78. Match the following algorithms with their best lime complexity
A) 2 C) 4
B) 3 D) 7
Question No.92. The two principal transport layer protocols on the TCP/IP suite are
A)TCP and IP
B)TCP and UDP C) IPv4 and IPv6
D) UDP and IP
-8--
int main()
int k;
k = (1,2,3,4,5);
printf("%d\n", k),
return 0;
a)1,2,3,4,5 c)0
b)(1,2,3,4,5) d)5