QUES_8
Short Description
Questions for CS students for preparing GATE likeexaminations...
Description
TarGATE’16
CSTest ID: 162268
www.gateforum.com
General Ability Q. No. 1 – 5 Carry One Mark Each
1.
There are five hotels in a line. If 4 men go into hotel at 11 a.m what is the probability that each go into a different hotel? (A)
2.
124 125
(B)
24 125
(C)
48
(D)
125
48 625
If a number is divided by 110, the quotient & the remainder are equal. Find the sum of all such numbers? (A) 110 × 111
3.
(B) 109 × 110 × 111 (C)
109 × 110 × 111 2
inity (D) inf inity
Replace the underlined parts with one of the options given below to correct the sentence: The population of Mumbai is greater t han any other city in the country. (A) than any city (B) compared to any other city cit y (C) amongst other cities (D) than that of any other city
4.
Identify a pair that best expresses a relationship similar to that expressed in the original pair ALTERCATION: ROW
(A) (B) (C) (D) 5.
Fallible: perfect shield: column vindication: horizontal Nefarious: wicked
The scam dealt a death ____ to the local minister’s political ambitions. (A) Rough (B) Smash (C) Blow (D) Pent
Q. No. 6 – 10 Carry Two Marks Each
6.
A thin piece of wire 40 meters long is cut into two pieces. One piece is used to form a circle with radius r, and the other is used to form a square. No wire is left over. Which of the following represents the total area, in square meters, of the circular and square regions in terms of r? 2 2 2 2 2 2 (A) πr (B) πr + 10 (C) πr + (40 - 2πr) (D) πr + (10 - 1/2πr)
ICP–Intensive Classroom Program
eGATE-Live Internet Based Classes DLP
Leaders
in GATE Preparation
65+
TarGATE-All India Test Series
Centers across India
© All rights reserved by Gateforum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. �
CSTest ID: 162268
TarGATE’16
www.gateforum.com
7.
If 12 ounce of a strong vinegar solution is diluted with 50 ounce of water to form a three percent vinegar solution, what was the concentration of the original solution (in %)?
8.
In a marathon race (50 kilometers), Birbal gave Tansen a 30-minute head start. Tansen runs the race at a rate of 6 kilometers per hour. Birbal runs the race at a rate of 7 kilometers per hour. If they start from the same point and follow the same path, how long will Birbal run before he overtakes Tansen? (A) 2.5 hours (B) 3 hours (C) 4.25 hours (D) 3.75 hours
9.
Samuel is obviously a bad fisherman. During the past season, in which he and the five members of his team spent four months on a boat together off Dutch Harbor, AK, he caught fewer fish than any of his teammates. Which of the following, if true, most weakens the argument above? (A) Two seasons ago, Samuel fished on another boat off Dutch Harbor and caught more fish than any other member of that boat. (B) Before becoming a fisherman, Samuel piloted a fishing boat whose members regularly caught record numbers of fish. (C) While fishing this past season, Samuel fell sick for a week and did not catch any fish during this time. (D) Unlike the other fishermen on his boat, at the order of the captain, Samuel fished this past season with experimental bait.
10.
Given below are three statement followed by three conclusions. Assuming the statement to be true, decide which one logically follows: Statements: I. No agora is cramped. II. Some turfs are cramped. III. All terrains are agoras. Conclusions: I. No terrain is cramped. II. No turf is a terrain. III. Some cramped are terrains. (A) Only III (B) Only II (C) Only I (D) None of these
Computer Science Engineering Q. No. 1 – 25 Carry One Mark Each
1.
What is the source and destination Addressing mode for the instruction? ADD Ax, [500]; Ax ← M[500]; (A) Immediate Memory direct
ICP–Intensive Classroom Program
(B) Memory direct & Register indirect
eGATE-Live Internet Based Classes DLP
Leaders
in GATE Preparation
65+
TarGATE-All India Test Series
Centers across India
© All rights reserved by Gateforum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. �
TarGATE’16
CSTest ID: 162268 (C) Memory direct & Register direct
2.
www.gateforum.com
(D) Memory Indirect & Register Indirect
Which of the following Instruction divides the contain of A by 32? Assume A has unsigned integer value. (A) SHL A, 5
3.
(B) SHR A, 5
(C) RoR A, 5
(D) SHR A, 32;
Consider the following Micro instruction Formats. Conditional bit (flag)
Micro operation
Next address
If System Supports 16 flag condition with 24 bit Micro instruction size. Assume that Memory is word addressable. The Micro operation field is 10 bit long. What is the size of control memory in Bytes?
4.
Consider following Regular Expression: (i) a*b*b (a+ (a(B)*)* b* (ii) a*(ab + b(A)* b*. What is length of shortest string which is in both (i) & (ii)? (A) 2 (B) 3 (C) 4
(D None
Describe in English the set denoted by regular expression (0 + 1) * +0 * 1 *
5.
(A) The set of strings that end with 0
(B) The set of strings that end with 1
(C) All string described by {0, 1}
(D) None of these n-4
6.
Which of the following is not true in the function f(n) = 2 ? (A) f(n) =
7.
Θ (2n+3)
1000
(B) f(n) is Ω (n
)
(C) f(n) = O(2
n-10
)
(D) None
How many number of comparison required to merge two sorted file of size m and n. (A) Maximum = m + n – 1 and minimum = Min (m,n) (B) Maximum = m + n and minimum = Min (m,n) (C) Maximum = and minimum both m + n – 1 (D) None
8.
What is the complexity at function? T (n) = (A)
0 (1) n =1 T n − 1 + log n n > 1 ) (
Θ ( nlogn )
(B)
ICP–Intensive Classroom Program
Θ ( n 2 log n )
(C)
Θ ( ( logn )2 )
eGATE-Live Internet Based Classes DLP
Leaders
in GATE Preparation
65+
(D) None of these
TarGATE-All India Test Series
Centers across India
© All rights reserved by Gateforum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. �
TarGATE’16
CSTest ID: 162268 9.
www.gateforum.com
Which of the following is used to represent three address codes? (A) Quadruple
(B) Triple
(C) Indirect Triple
(D) All of these
10.
In a memory system, If the physical address is 24 bits and number of frames are 128, then the page offset length in bits is__________.
11.
Which of the following is true about medium term scheduler? (A) It is used to decrease the degree of multiprogramming (B) It optimizes memory usage (C) It is used in the time sharing systems (D) All the above
12.
System having m resources of same type, process A, B, C, D needs 2,3,4,5 resources. What would be the minimum value of ‘m’ so that deadlock will not occur?
13.
Which one among the following is FALSE? (A) If a relation is in 3NF, then it is also in 2NF. (B) A relation in which every key has single attribute is in 2NF.
14.
(C) An FD: Non Prime Attribute
Non
Prime Attribute is valid in 2NF.
(D) An FD: Non Prime Attribute
Non
Prime Attribute is valid in 3NF.
Which of the following sorting algorithms requires minimum number of swaps in the worst cases? (A) Bubble sort
(B) insertion sort
(C) Selection sort (D) All have same number of swaps in the worst case
15.
Which of the following is/are true? I. II. III. IV. (A)
16.
If there are n devices connected using mesh technology, then total number of duplex links between the devices is n*(n+1)/2. Bus topology is easier to install than star topology. Ring topology is more secured than mesh topology. Fault isolation is easier in Bus topology than ring topology. I only (B) II only (C) II, III and IV (D) All of the above
Following is the header of a user datagram packet. ICP–Intensive Classroom Program
eGATE-Live Internet Based Classes DLP
Leaders
in GATE Preparation
65+
TarGATE-All India Test Series
Centers across India
© All rights reserved by Gateforum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. �
CSTest ID: 162268 10A3
2FF1
00F8
0000
TarGATE’16
www.gateforum.com
( All number are in Hexadecimal format )
Calculate the data length in Bytes?
17.
Which of the following weighted code will (complementing) each individual bit? (A) Excess - 3
18.
(B) 5421
give 9’s complement by changing
(C) 2421
(D) Both (A) & (C)
Consider the timing diagram shown below. Find the simplest switching expression for f(x,y,z).
x
(A) xy + xz
y
(B) xy + xyz
z
(C) x+y+z
f ( x, y, z)
(D) None of these
19.
20.
Let L denotes the language generated by the grammar S symbol then which of the following is t rue?
→ 00T, T →11S | 11. If S is the start
(A) L = (0 + 1) *
(B) L is regular but not (0 + 1) *
(C) L is context free but not regular
(D) L is not context free
Find the LR(1) table size for the following grammar. S → A | ab A → cAb | B B→a Assume m x n is table size where m represent number of sets or states of DFA and n represents number of columns of the table. (A) 10 x 7
(B) 14 x 7
ICP–Intensive Classroom Program
(C) 12 x 7
eGATE-Live Internet Based Classes DLP
Leaders
in GATE Preparation
65+
(D) 13 x 7
TarGATE-All India Test Series
Centers across India
© All rights reserved by Gateforum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. �
CSTest ID: 162268
21.
TarGATE’16
www.gateforum.com
Consider the following I. The No of edges in a simple graph of order 5 is less than or equal to 10. II. The No of edges in a simple graph of order n( ≥ 2) is exactly 10. Which of the following is correct? (A) I only
22.
(B) II only
(C) neither I nor II
(D) None
If G is a simple graph of order 80 is isomorphic to G(G is complement of G) then the size of G is ___ .
23.
Perform the following operations on the matrix
4 3 12
36
5
108
8
27
4
(i) Add the second row to the third row (ii) Subtract the second column from the first column The sum of the Eigen values and product of the Eigen values of the resultant matrix are respectively ______ (A) 132, 0
24.
For A=
(B) 142, 0
1 cos θ
(A) sin 2 θ
25.
Evaluate
(A) 1
∫
∞
0
cos θ 1
(C) 132, 1
, the determinant of A A (B) sin 4 θ
(D) 142, 1
T
is_____________.
(C) sin 6 θ
(D) sin 8 θ
∞
(D) None
t 3e − t sin tdt (B) 0
(C)
Q. No. 26 – 55 Carry Two Marks Each
26.
On a system using paging and segmentation, references to swapped-in locations accessible through an entry in cache memory takes 200 µs. The main memory access time is 400 µs. References that result in page faults require 10 ms if the page to be replaced has been modified, 5 ms otherwise. If the page fault rate is 5%, the cache memory hit rate is 65% and
ICP–Intensive Classroom Program
eGATE-Live Internet Based Classes DLP
Leaders
in GATE Preparation
65+
TarGATE-All India Test Series
Centers across India
© All rights reserved by Gateforum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. �
TarGATE’16
CSTest ID: 162268
www.gateforum.com
40% of replaced pages are “dirty”; then what is the effective access time (µs)? Assume the system is executing only a single process and the CPU is idle during page swaps.
27.
Consider a cache with 40 bit address 16384 blocks and block size is 256 byte Tags are 19 bit long. Hour many sets are there, and what is the associating of a cache? (A) 1024 sets, 8 way set Associative (B) 4096 sets, 4 way set Associative (C) 8192 sets, 2 way set Associative time (D) None
28.
Consider M is a Turing machine M = ({q 0 , q1 ,q 2 , q 3 , q 4 } {a, b} {a, b, B} , q 0 , B, {q 4 } ) accept the language L = {a n b n | n ≥ 0} the transition table for the Rules is States
A
B
q0
( q1 , B, R )
q1
( q1 , a, R )
q2
*
( q1 , b, R ) ( q3
q3
( q 3 ,a, L )
B
( q 2 , B, L )
B, L )
( q3 , b, L )
**
q4
What is the value of * & * * in transition table? * and * * are respectively (A)
( q 4 , B, R ) , ( q0 B, R )
(B)
( q1, B, R ) , ( q 0 , B, R )
(C)
( q 4 , B, R ) , ( q1B, R )
(D)
( q1 , B, R ) , ( q 2 , B, R )
29.
O 1 O O
1
1
ICP–Intensive Classroom Program
eGATE-Live Internet Based Classes DLP
Leaders
in GATE Preparation
65+
TarGATE-All India Test Series
Centers across India
© All rights reserved by Gateforum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. �
CSTest ID: 162268
TarGATE’16
www.gateforum.com
The above DFA accepts strings over {0, 1},
30.
(A) Has a substring 01
(B) Ends with 01
(C) Ends with 101
(D) Has a substring 101
Identify the relations for the given E-R diagramename
eno
pname
cost
Policy
EMP
age
Dependent
(A) EMP(eno, ename), DEPENDENT(pname, age), POLICY(eno, pname, cost) (B) EMP(eno, ename), DEPENDENT(pname, eno, age, cost) (C) EMP(eno, ename, pname, cost), DEPENDENT(pname, age) (D) EMP_DEPENDENT(eno, pname, ename, age, cost)
31.
Consider the message contains the following characters with their frequency: character Frequency a
5
b
9
c
12
d
13
e
16
f
45
If Huffman encoding technique is used, what is t he encoded string of each character? (A) a – 1100, b- 1101, c – 100, d – 101, e – 111, f – 0 (B) a – 1110, b- 1001, c – 110, d – 101, e – 100, f – 1 (C) a – 1100, b- 1101, c – 110, d – 101, e – 011, f – 0 (D) None
32.
Consider the following C function int f1(int n)
ICP–Intensive Classroom Program
eGATE-Live Internet Based Classes DLP
Leaders
in GATE Preparation
65+
TarGATE-All India Test Series
Centers across India
© All rights reserved by Gateforum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. �
CSTest ID: 162268
TarGATE’16
www.gateforum.com
{ if ( n==1 || n==2) return n; return ( n + f1(n-2) );
} The value of function call f1(16) is _________.
33.
Consider the following C program
void abc(int, int*,int*); void main() { int p=4, q=7, r=5; abc(p,&q,&r); printf(“%d %d %d”, p,q,r); p = 5; abc(p,&q,&r); printf(“%d %d %d”, p,q,r); }
void abc(int x, int *y, int *z) { while(x>0) { if (x%2 == 0) *y = *y + *z; else *y = *y - *z; x--; } } What is the output of the above program?
ICP–Intensive Classroom Program
eGATE-Live Internet Based Classes DLP
Leaders
in GATE Preparation
65+
TarGATE-All India Test Series
Centers across India
© All rights reserved by Gateforum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. �
CSTest ID: 162268
34.
www.gateforum.com
(A) 4 7 5
(B) 4 7 5
(C) 4 8 5
(D) 4 7 4
5 2 1
5 2 5
5 2 5
5 2 4
The 2’s complement representation of (-643) 12 in hexa decimal are. (A) ABE
35.
TarGATE’16
(B) C6D
(C) 9E7
(D) 46D
The language accepted by the following regular grammar is S →∈ 0S 1A A → 1A 0S 0
36.
37.
(A) Strings that do not end with ‘0’
(B) Strings that end with 1
(C) Strings that do not end with 1
(D) Strings that end with either 0 or 1
Match the following. Group I
Group II
(i)
Brute force technique
P.
Unique left most derivation
(ii)
LL parsing
Q.
Top-down parsing
(iii)
Ambiguity
R.
Bottom-up parsing
(iv)
Unambiguous
S.
Multiple R.M.D.
(A) i-Q, ii-R, iii-P, iv-S
(B) i-R, ii-Q, iii-S, iv-P
(C) i-Q, ii-Q, iii-S, iv-P
(D) i-R, ii-R, iii-S, iv-P
Consider a set of 5 processes whose arrival time, CPU time needed and the priority are given below Process
Arrival Time
CPU
time needed(in ms)
Priority
P1
0
5
5
P2
1
7
2
P3
2
3
1
P4
4
15
3
P5
5
20
4
Note higher number smaller priority.If the CPU scheduling policy is SJF, the average waiting (without preemption) will be_________ms.
ICP–Intensive Classroom Program
eGATE-Live Internet Based Classes DLP
Leaders
in GATE Preparation
65+
TarGATE-All India Test Series
Centers across India
© All rights reserved by Gateforum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. ��
CSTest ID: 162268
TarGATE’16
www.gateforum.com
38.
Let A and B are two stations attempting to transmit on an Ethernet. Each has a steady queue of frames to send. After each frame is sent (from both sides), they collide for the first time and contend for the channel, using the binary exponential back off algorithm. What is the probability the contention ends after 2 successful transmissions?
39.
Consider a set of four processes {P1, P2, P3, and P4} using a binary semaphore “mutex” for synchronization with initial value of mutex is 0. The code for the given processes is as follows:P1
P2
P3
P4
repeat
repeat
repeat
repeat
P(mutex)
P(mutex)
V(mutex)
P(mutex)
{
{
{
{
Critical Section
Critical Section
Critical Section
Critical Section
}
}
}
}
P(mutex)
P(mutex)
V(mutex)
P(mutex)
forever
forever
forever
forever
The maximum number of processes that can be i n critical section are _____.
40.
The function f(x) = 3x 2 + 4x − 2 is integrated between 0 and 2 (both inclusive) using single step application of Trapezoidal rule. The difference between the values obtained from Trapezoidal rule and exact solution is __________ .
41.
Consider the following schema, where primary keys are underlined and is a foreign key referring to EMP( eno).
DEPENDENT(eno)
EMP (eno, ename,salary) DEPENDENT(eno,depname)
Which of the following expression returns the employees having at least one
dependent?
(A) { t.eno | emp(t) AND ( d) [ dependent(d) AND d.eno=t.eno]} (B) { t.eno | emp(t) AND ( d) [ dependent(d) OR
d.eno=t.eno]}
(C) { t.eno | emp(t) AND (
d) [ NOT(dependent(d)) AND d.eno=t.eno]}
(D) { t.eno | emp(t) AND (
d) [ dependent(d) OR d.eno=t.eno]}
ICP–Intensive Classroom Program
eGATE-Live Internet Based Classes DLP
Leaders
in GATE Preparation
65+
TarGATE-All India Test Series
Centers across India
© All rights reserved by Gateforum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. ��
CSTest ID: 162268 42.
TarGATE’16
www.gateforum.com
Below is the behavior of the sequential is designed by using T-Flip Flop, the out sequences for the following circuit Q 2Q1 is 00,01,10,01.
x
T1
Q2
T2
Q1
clk To complete the circuit the input ‘X’ should be (A)
43.
1
( Q 2 + Q1 )
(B)
( Q2 + Q1 )
(C)
( Q2 ⊕ Q1 )
(D) None of the Above
Consider the following IP address with corresponding subnet mask: IP Address = 172.60.48.20 Subnet mask = 255.255.224.0 Find the range of assignable IP Address on the subnet on which the host belongs?
44.
(A) 172.60.32.0-172.60.63.255
(B) 172.60.32.1-172.60.64.255
(C) 172.60.32.1-172.60.63.254
(D) 172.60.32.0-172.60.64.254
If M bit is 0, the value of HLEN is 5, the value of total length is 200, and the offset value is 200, then the first byte and the last byte in this IP Datagram is ___________________ (A) 1600 & 1679
45.
(B) 1700 & 1779
(C) 1600 & 1779
(D) None
If we use Additive Cipher with key =10 then encrypt the message “GATEFORUM”? (Assume A=1, B=2…… Z=26) (A) QKDOPYBEW (B) QKDOFYBMW (C) YBEWQKDOP
46.
(D) None of these
The distance from earth to a distant planet is approximately 9 Gm. if a stop-and-wait protocol is used for frame transmission on a 32 Mbps point-to-point link, then the channel utilization is ________________ (Assume that the frame size is 32 KB and the speed of light is 3 × 108 m / s. ) (A) 0.13
(B) 0.013
ICP–Intensive Classroom Program
(C) 1.3
eGATE-Live Internet Based Classes DLP
Leaders
in GATE Preparation
65+
(D) 13
TarGATE-All India Test Series
Centers across India
© All rights reserved by Gateforum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. ��
TarGATE’16
CSTest ID: 162268 47.
www.gateforum.com
In the following circuit, the initial value of X is 1 and P is 0 when the circuit is initialized. A 0 on TRST resets the flip-flop. What logic values should be applied to get a ‘0’ on X? (A) D = 0, P = 0 �
(B) TRST = 0, P = 0
�
(C) D = 1, P = 0 (D) None of these � � �� ����
48.
Consider the circuit given below: � � ��
��
��
��
��
��
��
��
� � �
��� ���
�� �� ��
� �
�
S2 ,S1and S0 are select lines and x 7 to x 0 are input lines. S0 and x 0 are LSBs. The output y is (A) A ⊕ B
(
(C) C A ⊕ B
49.
(B) A ⊕ B
) + C ( A ⊕ B)
Which of the following functions is/are analytic everywhere in the complex plane? 1.
f ( z ) = z − 3z
2.
f ( z) = ( x 2
3.
f ( z ) = ( e x cos y − y ) + i ( ex sin y + x )
4.
f ( z ) = xy + iy
(A) 1, 3 only
50.
(B) 2, 4 only
− y 2 + x ) + i ( 2xy + y )
(C) 1, 4 only
(D) 2, 3 only
Let R = {(a, b), (b, c), (b, d)} be a relation in {a, b, c, d}; which elements should be added to + the set to get the transitive closure R (A) (a, b), (a, d)
(D) Indeterminate state
(B) (a, c), (c, d)
ICP–Intensive Classroom Program
(C) (a, b), (a, c)
eGATE-Live Internet Based Classes DLP
Leaders
in GATE Preparation
65+
(D) (a, c), (a, d)
TarGATE-All India Test Series
Centers across India
© All rights reserved by Gateforum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. ��
TarGATE’16
CSTest ID: 162268
www.gateforum.com
51.
Calculate the minimum number of nodes in an AVL tree of height 6. [height: length the longest path from rode to any node]
52.
Consider the following graph
v1
of
v2
v3
v5
v6
v4
The number of paths of length 2 that pass through the vertices v1 and v 3 are respectively. (A) 6, 3
53.
(B) 3,6
If x is uniformly distributed over
(C) 3,3
(D) 6,6
( −a, a ) , a > 0 the
value of ‘a’ such that P ( x ≥ 1) =
1 3
is
_______.
54.
Which of the following differential equations have y=sinx as solution? (A) y '− y cot x = 0
(B) y ''+ y = 0
(C) y '''+ y' = 0
(D) y'''− y''+ y' − y
(A) 1 and 2 only
55.
By reversing the order of integration, (A) (C)
(B) 1, 2 and 3 only
) ∫ (∫ ∫ ( ∫ xydx ) dy + ∫ ( ∫ ∫ (∫ 3
1
3
1
2
y −1
xydx dy +
y −1
2
1
2
−1
y −1
1
2
−1
1− y
ICP–Intensive Classroom Program
=0
(C) 2 and 3 only
1
1+ x
0
1− x
∫ (∫
)
xydx dy
)
(xydx) dy
)
xydy dx can be expressed as (B)
∫ (∫
(D)
∫∫
3
1
1
y −1
2
1− y
0 0
xydxdy
in GATE Preparation
65+
) (∫
xydxdy +
eGATE-Live Internet Based Classes DLP
Leaders
(D) All
+ ∫−1 1
∫∫
0
−1
y−1
0
y −1
2
)
xydx dy
xydxdy
TarGATE-All India Test Series
Centers across India
© All rights reserved by Gateforum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. ��
View more...
Comments