You are on page 1of 53

PRE‐GATE‐2018

Computer Science and Information Technology

The GA section consists of 10 questions. Questions 1 to 5 are of 1 mark each, and


Questions 6 to 10 are of 2 marks each.

01. Choose the most appropriate word from the options given below to complete the following
sentence:
If I had known that you were coming, I _____________ you at the airport.

(A) would have met (B) shall have met


(C) would meet (D) would have meeting
Ans: (A)
Exp: Conditional tense type three should be if clause (had+v3) and the main clause (would+have+v3).

02. In the following sentence certain parts are underlined and marked P, Q and R. One of the
parts may contain error or may not be acceptable in standard written communication.

Select the part containing an error. Choose D as your answer if there is no error.
They found that five prisoners escaped the previous night. No error
(P) (Q) (R) (D)

(A) P (B) Q (C) R (D) No error


Ans: (B)
Exp: In part 'Q' it should be 'prisoners had escaped' because the earlier action of the past should be in
past perfect tense (had + v3).

03. The question below consists of a pair of related words followed by four pairs of words. Select
the pair that best expresses the relation in the original pair.
LAVA : VOLCANO ::
(A) ice : glass
(B) cascade : precipice
(C) steam : geyser
(D) avalanche : ice
Ans: (C)
Exp: (DEFINING CHARACTERISTIC) A volcano gives out lava (meaning molten rock); a geyser
(meaning a natural hot spring) gives out steam.
ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata

: 2 : CSIT

04. If “JUICE” is coded as “19-41-17-5-9”, then “TOY” will be coded as

(A) 39-29-49 (B) 41-31-51

(C) 13-23-3 (D) 15-25-5

Ans: (A)
Sol: AS,

10 21 9 3 5
J U I C E

102 212 92 32 52


–1 –1 –1 –1 –1
19 41 17 5 9

Same as,

20 15 25
T O Y

202 152 252


–1 –1 –1
39 29 49

But in option (B)

20 15 25
T O Y

202 152 252


+1 +1 –1
41 31 51

It is not in that code


Option (C) and (D) are not correct

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 3 : CSIT

05. Fill in the blanks with an appropriate idiom


Let us have your terms ____________
(A) through thick and thin
(B) in black and white
(C) ins and outs
(D) at cross-purposes
Ans: (B)
Exp: (A) through thick and thin means under all conditions
(B) correct answer - in black and white means in writing
(C) ins and outs means full details
(D) at cross-purposes means misunderstand each other
So the right option is 'B'

06. Statement: These apples are too expensive to be bad.


Which of the following can be logically inferred from the above statement?

I. The higher the selling price, the superior is the quality of the commodity.
II. When apples are in short supply, the prices go up.

(A) Only I (B) Only II


(C) I & II (D) None of the above
Ans: (A)
Exp: The second conclusion is irrelevant. The first is the meaning of the given statement.
'Too expensive to be bad' means that it can't be bad because it is expensive.

07. A postman walked 7 km north from the post office to reach Mr. Singh’s house. He then took a
left turn and walked 4 km to reach Mr. Kumar’s house. He then took a right turn and walked 3
km to reach Mr. Sharma’s house. The distance between Mr. Sharma’s and Mr. Singh’s house is
______.
(A) 5 km (B) 6 km

(C) 4 km (D) 7 km
ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata

: 4 : CSIT

Ans: (A)
Sol: Let the postman started from the point P which denote post office.

C (Mr. Sharma’s house)

3km N

B A (Mr. Singh’s house)


(Mr. Kumar’s house) 4 km W E
7 km

S
P
(Post office) starting point

We have to find the distance between A and C so, applying Pythagoras theorem,
AC2 = AB2 +BC2 = 16 + 9
AC2 = 25
AC = 25 = 5 cm
So, distance between Mr. Sharma’s and Mr. Singh’s house is 5 km.
Option (B) is not correct
Option (C) is not correct
Option (D) is not correct

08. How many 3-digit even number can be formed from the digits 1, 2, 3, 4, 5, 6, if the digits can be
repeated?
(A) 216 (B) 108 (C) 96 (D) 54
Ans: (B)
Sol:

Hundred Tens Unit place

We know that, a number is called even, if its unit's place is occupied by an even digit (i.e) 2, 4, 6
So, for unit place, we have 3 options
For tens place, there are 6 options
For hundred place, there are 6 options
ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata

: 5 : CSIT

[Repetition allowed]
 Total number of ways in which 3 digit even numbers can be formed = 366 = 108
Option (a) is not correct
Option (c) is not correct
Option (d) is not correct

09. Examine the information given below


All the leaders are believable
Some believable persons are intelligent

Which of the following is a valid conclusion regarding the above arguments?


(A) All the leaders are intelligent
(B) some leaders are believable
(C) All the intelligent persons are leaders
(D) some believable persons are leaders
Ans: (D)
Sol: The given statements can be represented as
Case – I
Believable

Intelligent

(i)
Leader

(or)
Case – II

Believable

Intelligent

(ii)
Leader
ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata

: 6 : CSIT

From above two diagrams


Choice (A), does not follow
Choice (B), does not follow
Choice (C), does not follow
Choice (D), follows
Hence, option (D) is correct

10. A shopkeeper sells note books at the rate of ₹457 each and earns a commission of 4%. He also

sells pencil boxes at the rate of ₹80 each and earns a commission of 20%. How much amount of

commission will he earn in two weeks, if he sells 10 note books and 6 pencil boxes a day?

(A) ₹1956 (B) ₹1586

(C) ₹1496 (D) None of these

Ans: (D)
Sol: S.P of the note book = ₹457

4  457
 Commission on one note book = ₹
100
10  4  457
and commission on 10 note books = = ₹ 182.80
100
and S.P of the pencil box = ₹80

80  20
 Commission on one pencil box = ₹
100
80  20  6
Commission on 6 pencil boxes = = ₹96
100
Hence, total commission of one day = (182.80+96) = ₹ 278.80

Thus, total commission of two weeks = 278.80 14 = ₹3903.20

Option (A) is not correct


Option (B) is not correct
Option (C) is not correct
 None of these is the answer
ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata

: 7 : CSIT

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 8 : CSIT

The subject specific section of CSIT consists of 55 questions, out of which question numbers 1 to 25
are of 1 mark each, while question numbers 26 to 55 are of 2 marks each

01. Which of the following is true of compaction?


(A) It can be done at assembly, load or execution time
(B) It is used to solve the problem of internal fragmentation
(C) It cannot shuffle memory contents
(D) It is possible only if relocation is dynamic & done at execution time
01. Ans: (D)
Sol: Compaction is carried out as a solution to external fragmentation. It is carried out during runtime,
provided programs support dynamic relocation.
Distractor Logic
Option A: Compaction is done before runtime Option B: Fragmentation is an issue in paging
Option C: Compaction is same as Coalescing Option D: Refer to solution

02. Create AVL tree for the following elements


5, 20, 15, 3, 4, 2
Then the root element is ______.
02. Ans: 4
Sol:
Insert : 5 Insert : 20 Insert : 15 15

0 +2
5 5 5 20
5
L
–1 –1
20 20
R
0
15 15
Insert : 3
+1 4 20
15

+1 0
3 5
5 20

0
3

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 9 : CSIT

Insert : 2
4 root = 4
+2
15

+1 L 0 3 15
4 20
2 5 20
–1 L 0
3 5
L
0
2

03. Consider the following statements


S1: Two address instructions are used for preventing W.A.R and W.A.W Hazards in pipeline
organization.
S2: Zero address instructions are used for addressing stack memory while performing pushing
and poping operations
S3: Content of stack pointer (SP) is incremented after executing PUSH R instruction, when stack
is implemented with growing up technique.
S4: Memory indirect addressing mode requires two memory visits in the execution cycle of the
instruction (Excluding fetch cycle)
Correct statement (s) is/are

(A) All (B) S3 only


(C) S3 and S4 (D) S2, S3 and S4
03. Ans: (C)
Sol: S1 is false because, three address instructions are used for preventing WAR and WAW
instructions.
S2 is false because PUSH R and POP R instructions are used for stack memory i.e., PUSH R and
POP R instructions are one address instructions.
S3 is correct because in stack growing up technique the SP is initialized to stack memory starting
address, content of SP is incremented after executing PUSH R instruction and decremented after
POP R instruction execution.
S4 is correct because in memory indirect addressing mode, CPU requires first memory visit to get
effective address and second memory visit to Read/Write operand from/to memory.
ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata

: 10 : CSIT

04. Which one of the following instances of R(ABCDE) not violates BC→D ?
(A) R = (a,2,3,4,5) (2,a,3,4,5) (a,2,3,6,5) if a = 2.
(B) R = (a,2,3,4,5) (2,a,3,4,5) (a,2,3,6,5) if a = 3.
(C) R = (a,2,3,4,5) (2,a,3,4,5) (4,2,3,a,5) if a = 4.
(D) R = (a,2,3,4,5) (2,a,3,a,5) (a,2,3,6,5) if a = any value
04. Ans: (C)
Sol: For a = 4; BC→D is satisfying for all tuples
Distractor Logic
Option A: 1st and 3rd tuples are violating the dependency.
Option B: 1st and 3rd tuples are violating the dependency but 2nd tuple does not
Option C: Refer to solution
Option D: All the tuples are violating the dependency

05. When a child process is created, using fork system call, what is true from the following?
(A) Child process runs concurrently with parent
(B) Child is a duplicate of parent
(C) Child process may/can execute a new program loaded into it
(D) All of the above
05. Ans: (D)
Sol: Newly created child process has its own address space. By default the code of child is a replica of
parent, however, using exe() it can load another program
Distractor Logic
Option A: Child starts only after completion of parent.
Option B: Child process code starts copying from the next statement of fork.
Option C: Child always execute a new program in its address space.
Option D: Refer to solution

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 11 : CSIT

 sin 2kx 
06. 0 sin x
dx (k is an integer) = ________.

(A) 0 (B) k
k
(C) 2k (D)
2
06. Ans: (A)

 sin 2kx 
Sol: Let I   dx
0 sin x

 sin 2k   x 
 dx (By properties of definite integrals)
0 sin   x 

 sin 2kx 
  dx  I
0 sin x

 2I = 0

I=0

07. Booth's code for decimal value of 'x' in 8 bit is '–1 0 0 0 +1 0 0 +1', then 'x' value is
(A) –119 (B) +119
(C) –68 (D) None of these
07. Ans: (D)
The above mentioned booth's code is invalid; because in booth's code, possible operation for LSB
can be 0 or (–1) but not +1.
Distractor Logic
Option A: Option 'A' will become correct answer for the code of (–1 0 0 +1 –1 0 +1 –1).
Option B: Option 'B' will become correct answer for the code of (+1 0 0 –1 +1 0 0 –1).
Option C: Option 'C' will become correct answer for the code of (–1 +1 0 0 0 –1 0 0).
Option D: Refer to solution

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 12 : CSIT

08. void func(char *P)


int main( )
{
char *str = "tap";
func(str);
return 0;
}
void func(char *P)
{
if (*P)
{
func(P + 1);
printf("%c", *P++);
}
}
What is the output of the above program?
(A) pat (B) tap
(C) apt (D) tpa
08. Ans: (A)

func (100) str 0 1 2 3


100 't' 'a' 'p' '\0'
func (101) printf("%c", *P++) 100 101 102 103
P
func (102) printf("%c", *P++) 100

func (103)
printf("%c", *P++)

It prints reverse of the string, So output is "pat".


Distractor Logic
Option A: Refer to Solution
Option B: If student thinks that the given string constant does not change.
Option C: If student thinks that first character 't' will be placed in the place of right of 'p'.
Option D: If student thinks that last two characters get swapped.
ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata

: 13 : CSIT

09. A random variable X has normal distribution with mean 3 and variance 16. If area under the
standard normal curve to the left of Z = 0.25 is 0.5987, then P(2 < X < 4) _______
09. Ans: 0.1974 (range 0.19 to 0.20)
X
Sol: The standard normal variable Z 

X3

4
1
X=2 Z
4
1
X=4 Z
4
Required probability = P(2 < X < 4) 0.0987
 1 1
 P   Z  
 4 4
 1 0.5
 2 P 0  Z  
 4 z
= 2(0.0987) = 0.1974 0 0.25

10. To implement Half sub-tractor, minimum number of 2 × 1 multiplexers required are ______.
10. Ans: 3
Sol:
A Half Difference = A  B
Inputs subtractor Output
B Borrow  AB

For Difference

1 I0 B I0
2×1 2×1 Difference  A B  AB  A  B
MUX B MUX
0 I1 S0 I1 S0

B A

For Borrow

B I0
2×1 Borrow  A B
MUX
0 I1 S0

A
ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata

: 14 : CSIT

For Difference, two 2 × 1 MUX,


For Borrow one 2 ×1 MUX
Total three 2 × 1 MUX required

11. Match the List-I with List-II

List-I List-II

P. L = {an bn | n1 } (i) Mapping formal parameters with actual parameters


Q. L = {wwR| w(0+1)*} (ii) Comparing else with if
R. L = {ww|w(0+1)*} (iii) Structure is palindrome
S. L = {0n 1m 0n 1m|m, n>1} (iv) Usage of variable before declaration

(A) P - i, Q - ii, R - iii, S - iv


(B) P - ii, Q - iii, R - iv, S - i
(C) P - iii, Q - iv, R - i, S - ii
(D) P - ii, Q - iii, R - i, S - iv
11. Ans: (B)
Sol: an bn - comparing if block with else.
wwR - structure of the string is palindrome
ww - declaration of the variable before use
0n1m0n1m - mapping formal parameters with actual parameters.
Distractor Logic
Option A: P - i, Q - ii, R - iii, S - iv
P is to compare if else pattern
(i) is for actual and formal parameters mapping
So option (A) is not possible
Option B: Refer to solution
Option C: P - iii, Q - iv, R - i, S - ii
Q – palindrome but (iv) is for variable declaration before use, so option (C) is not
possible

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 15 : CSIT

Option D: P - ii, Q - iii, R - i, S - iv


R– is semantic concept but (i) is syntactic concept
So option (D) is not correct.

12. Which of the following statement is true?


(A) SLR parser is more powerful than LALR.
(B) LALR is more powerful than CLR.
(C) CLR parser is more powerful than LALR.
(D) SLR, CLR, LALR parsers have the same power.
12. Ans: (C)
CLR parser is more powerful than LALR
Distractor Logic
Option A: LALR accepts more class of grammars than SLR
Option B: CLR accepts more class of grammars than LALR
Option C: Refer to Solution
Option D: CLR is more powerful among all the LR parsers

13. The 8’s complement of (6250)8 is

(A) 2638 (B) 1527

(C) 1530 (D) 2630

13. Ans: (C)

Sol: r’s complement = subtract 1st Non zero bit [from LSB side] from “r” & remaining from
(r–1). Write zero bit [at LSB] as it is
Here given r = 8 & r–1 = 7

7 7 8
8’s complement of N  6 2 5 0
↓ ↓ ↓ ↓ as it is
1 5 3 0

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 16 : CSIT

Distractor Logic
Option A: After r’s complement, in result all bits are less than “r” but in option (A) at LSB
given "8" but in 8's complement all bits are less than "8".
Option B: It is a (r–1)'s complement but not r’s complement
Option C: It is a r's complement [Here r = 8]
Option D: Except LSB remaining all bits are subtracted from “r” this is wrong.
For r's complement, subtract 1st non zero from “r” remaining from (r–1)

14. Identify valid statements pertaining to switching


S1: Computer networks are based on packet switching.
S2: Packet switching increases the available throughput.

(A) Both S1 and S2 (B) S1 only


(C) S2 only (D) Neither S1 nor S2
14. Ans: (A)
Sol: S1: Computer networks are based on packet switching concept
S2: In packet switching, a packet can be forwarded before the next packet is fully arrived in, so
increases throughput.

15. If degree sequence of a simple graph G is {3, 2, 2, 1, 0} then degree sequence of G is ______
(A) {5, 4, 3, 3, 2} (B) {4, 3, 2, 2, 1}
(C) {5, 4, 3, 3, 0} (D) {4, 3, 2, 2, 0}
15. Ans: (B)
Sol: G is a simple graph with 5 vertices.
For any vertex v in G,
deg(v) in G + deg(v) in G = 4

 The degree sequence G is


{4 – 3, 4 – 2, 4 – 2, 4 – 1, 4 – 0}
= {1, 2, 2, 3, 4}
= {4, 3, 2, 2, 1}

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 17 : CSIT

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 18 : CSIT

16. Match the following


PDU (Protocol Data Unit) Message Unit
P. NPDU 1. Segment
Q. TPDU 2. Frame
R. DPDU 3. Packet
P Q R
(A) 3 1 2
(B) 2 1 3
(C) 1 2 3
(D) 3 2 1
16. Ans: (A)
Sol: NPDU = Packet
TPDU = Segment
DPDU = Frame

17. Consider the Boolean function f(x, y, z) = xy + z . The minimum number of two-input NAND
Gates required to realize the given function is_____.
17. Ans: 2
Sol: Given f(x, y, z) = xy + z .
We can write above function as

f  f  xy  z

f  xy.z

 
f  xy z 

The above expression can be realized as shown below

x xy
y
xy. z  xy  z
z

Hence 2 NAND Gates are required

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 19 : CSIT

18. Let A = {1, 2, 3, 4} and a relation R on A is defined by R = {(1, 2), (2, 3), (3, 4), (2, 1)}. The
transitive closure of R is _______.
(A) A A
(B) {(1, 2), (2, 3), (1, 3), (2, 4), (1, 1)}
(C) {(1, 1), (1, 2), (1, 3), (1, 4), (2, 1), (2, 2), (2, 3), (2, 4), (3, 4)}
(D) {(1, 2), (1, 3), (1, 4), (2, 3), (2, 4) (3, 4), (1, 1)}
18. Ans: (C)
Sol: The digraph for R is shown below

1
3

4
We see that from vertex 1, we have paths to vertices 2, 3, 4 and 1.
from vertex 2, we have paths to vertices 1, 2, 3 and 4.
From vertex 3, we have path to vertex 4.
 Transitive closure of R = {(1, 1), (1, 2), (1, 3), (1, 4), (2, 1), (2, 2), (2, 3), (2, 4), (3, 4)}.
19.
2 7 5 8
6
5 3 2 4
1 2 4 5 7 3 9
2 3 6
3 7 8
9 2

If we apply Prim's algorithm on vertex (1) then number of MSTs possible are _________.
19. Ans: 2
Sol: By using Prim's algorithm we have two MSTs that are possible. They are
<1, 3> <3, 2> <3, 4> <4, 5> <5,7> <7, 8> <8, 6> <6, 9>
or
<1, 3> <3, 2> <2, 4> <4, 5> <5, 7> <7, 8> <8, 6> <6, 9>

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 20 : CSIT

20. In the Assembly Language Program of a Basic Machine, after executing the last instruction in a
given sub-routine program,
(A) The stack pointer content will be placed in program counter to return back to the main
program execution
(B) The stack pointer content acts as memory address and that memory addressed content will be
placed in program counter to return back to the main program execution.
(C) Instruction register content will be placed in program counter to return back the program
execution to the main program.
(D) Content of instruction register acts as memory address and that addressed content will be
placed in PC to get back the program execution to main program
20. Ans: (B)
Sol: Last instruction in sub-routine is 'RET'.
Distractor Logic
Option A: Option 'A' is false because after execution of RET instruction, the SP content is
placed in
Option B: Refer to solution
Option C: Option 'C' and 'D' are always false because instruction register does not participate
to supply the return address to the program counter after executing the subroutine
programs.
Option D: Option 'C' and 'D' are always false because instruction register does not participate
to supply the return address to the program counter after executing the subroutine
programs.

21. The number of hosts per network in class "C" of IPv4 address is _________.
Ans: 254
Sol:
32 C

NID HID
24 8
28-2 hosts per network
256–2=254

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 21 : CSIT

22. Let L1 is a Regular Language, L2 is Context Free and L3 is Recursive Enumerable but not
Recursive Language.
Which of the following statement is correct?
(A) L1L2 is Deterministic CFL
(B) L2L3 is Regular Language
(C) L2  L3 is Recursive Enumerable Language
(D) L1L2 L3 is Recursive Language
22. Ans: (C)
Sol: L2 is CFL and every CFL is REL, L3 is REL.
From closure property union of 2 REL's is again a REL.
 L2  L3 is REL
Distractor Logic
Option A: L1L2 can be REL but REL need not be DCFL
Option B: L2L3 is CFL but a CFL need not be Regular
Option C: Refer to solution
Option D: L1L2 L3 is REL and REL may not be Recursive Language

23. If the characteristic equation of An×n is n + c1 n–1 + c2 n–2 +.......+ cn–1  = 0, then which of the
following is true?
(A) A is singular (B) A is non singular
(C) Rank of A = n – 1 (D) A has n linearly independent eigen vectors
23. Ans: (A)
Sol:  = 0 is an eigen value of A
 A is singular
Distractor Logic
Option A: Refer to solution
Option B: if  = 0 is an eigen value then A is not non-singular
Option C: if A is singular then rank of A is  (n – 1)
Option D: if A is singular then the matrix may or may not contain n linearly independent
eigen vectors
ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata

: 22 : CSIT

24. Let L is any language over the alphabet  with only one symbol and there are infinite number of
equivalence classes with respect to language L.
Which of the following language represents L?
(A) {a2n | n  0} (B) {an! | n  0}
(C) {ap | p is 32nd prime} (D) {ap| p is a perfect number < 10}
24. Ans: (B)
Sol: L has infinite number of equivalence classes. If with respect to any language, there are infinite
number of equivalence classes there that language is non regular.
So, L is a Non-Regular Language
Distractor Logic
Option A: Given language is Non-Regular but {a2n | n  0} is Regular
Option B: Given language is Non-Regular and {an! | n  0} is non regular by Pumping
Lemma
Option C: Given language is Non-Regular but {ap | p is 32nd prime} is finite language and
Regular
Option D: Given language is non-regular but {ap | p is perfect number < 10} is finite
language and hence Regular Language

25. int main( )


{
char str1[15] = "Good";
char str2[ ] = "Evening";

strcpy(str1 + strlen(str1), str2);


printf("%s", str1);
return 0;
}
(A) GooEvening (B) GoodEvening
(C) Good (D) Evening
25. Ans: (B)
ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata

: 23 : CSIT

Sol:

str1 str2

100 'G' 'o' 'o' 'd' '\0' 200 'E' 'v' 'e' 'n' 'i' 'n' 'g' '\0'
100 101 102 103 104 200 201 202 203 204 205 206 207

strcpy (str1+strlen(str1), str2); will append str2 to str1, So the output is GoodEvening.

Distractor Logic
Option A: If student thinks that string length is '3' for first string then we get this output.
Option B: Refer to Solution
Option C: If student thinks that only first string is printed
Option D: If student thinks that only second string is printed.

26. A ROM is designed with Decoder and OR gates; decoder is used for addressing one of the words
by accepting the word address as input for decoder and one OR gate is used to deliver one data bit
to external world.
The above type of ROM is used to store the table for squarer of 8 bit unsigned integer.
To design this ROM, minimum number of 'OR' gates required are ________.
26. Ans: 14
Sol: Input data size is 8 bit, but longest result size is 16 bit i.e., generally '16' OR gates are required;
but in squarer operation, the LSB in the result is equal to the LSB in input data and always D1 bit
is '0'.
Hence 2 number of OR gates are not needed for this design; So, '14' OR gates are sufficient

A7 O65535 D15
8 × 256 Result of
Data Input
Decoder squarer
A1 O1
D2 operation
A0 O0
Decoder Output '0' D1
D0

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 24 : CSIT

Input

A7 A6 A5 A4 A3 A2 A1 A0

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 1

0 0 0 0 0 0 1 0

0 0 0 0 0 0 1 1

1 1 1 1 1 1 1 1 = (25510)

Output
D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
1
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0




1
1 1 1 1 1 1 1 0 0 0 0 0 0 1 0
(6502510)

A0 = D0 and always D1 = 0
So, OR gates are not needed to deliver D0 and D1 result bits

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 25 : CSIT

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 26 : CSIT

27. Consider a disk queue holding requests to the following cylinders in order 116, 22, 3, 11, 75, 185,
100, 87. Using SCAN algorithm, what is the order of servicing the requests, assume the head is at
cylinder 88 & moving upward?
(A) 116-22-3-11-75-185-100-87 (B) 100-116-185-87-75-22-11-3
(C) 87-75-100-116-185-22-11-3 (D) 100-116-185-3-11-22-75-87
27. Ans: (B)
Sol: SCAN Algorithm satisfies the requests in a cyclic fashion, moving from one end to another end
of disk platter from 88, next higher numbered track is 100 & then 116, 185 & then reaches end of
disk 2 take reverse then.
Distracr Logic
Option A: Moving Backwards
Option B: Refer to solution
Option C: Gets re-initialized like LOOK algorithm
Option D: Gets re-initialized like CLOOK

28. Consider two points x and y connected with channel whose bandwidth is 50 kbps and
propagation delay is 250 ms. If the frame size is1000 bits, then the optimum window size of the
sender is ________.
28. Ans: 25
Sol: Frame length L = 1000 bits
Bandwidth = 50 Kbps
Propagation delay = 250 ms
Window size = B * R / L
= 50 kbps * 2 * 250 ms / 1000 bits = 25

29. Consider the following arguments:


I. {A  (B  C), D  (B  ~C), (A  D)}  E
II. {(R  ~Q), (R  S), (S  ~Q), (P  Q)}  ~P
Which of the following is true?
(A) only argument I is valid (B) only argument II is valid
(C) both arguments are valid (D) both arguments are invalid
ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata

: 27 : CSIT

29. Ans: (C)


Sol: I) The premises are
1) A  (B  C)
2) D  (B  ~C)
3) (A  D)
we can show that these premises are inconsistent.
4) A (3), Simplification
5) D (3), Simplification
6) (B  C) (1), (4), Modus ponens
7) (B  ~C) (2), (5), Modus ponens
8) ~(B  C) (7), Equivalence
9) F (6), (8), Conjunction
 The premises are inconsistent
Hence argument I is valid
II) The premises are
1) (R  ~Q)
2) (R  S)
3) (S  ~Q)
4) (P  Q)
Indirect proof
5) P New premise
6) Q (4), (5), Modus ponens
7) (Q  ~R) (1), Contra positive equivalence
8) ~R (6), (7), Modus ponens
9) S (2), (8), Disjunctive syllogism
10) ~Q (3), (9), Modus ponens
11) F (6), (11), Conjunction
 The argument is valid
ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata

: 28 : CSIT

30. The receiver has received the message as follows:


Bit positions 1 2 3 4 5 6 7 8 9 10 11
Message 011001001 1 0

by considering odd parity


The bit error position that can be corrected using Hamming Method is ________.
Where the number of message bits are 7 before encoding.
30. Ans: 4
Sol:
Received parity Recall parity bits at receiver
P1 0 P1 1 mismatch
P2 1 P2 0 mismatch
P4 0 P4 0 match
P8 0 P8 1 mismatch

Compare parities
If mismatch, then add to the counter
P1 + P2+ P8 11 bit
The recalculated parities based on the received message is as follows:

1 2 3 4 5 6 7 8 9 10 11
0 1 1 0 0 1 0 0 1 1 0
P8 P4 P2 P1 P1 1 3 5 7 9 11
1. 0 0 0 1 1 1 0 0 1 0
2. 0 0 1 0
P2 2 3 6 7 10 11
3. 0 0 1 1
0 1 1 0 1 0
4. 0 1 0 0
5. 0 1 0 1 P4 4 5 6 7
6. 0 1 1 0 0 0 1 0
7. 0 1 1 1 P8 8 9 10 11
8. 1 0 0 0 1 1 1 0
9. 1 0 0 1
10. 1 0 1 0
11. 1 0 1 1
ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata

: 29 : CSIT

31. Suppose that = {0,1} and  = {a,b} be the two alphabets and h: →  is a homomorphism
such that
h (0) = ab
h (1) = ba
Let r1= 010* and r2 = 101* be the two Regular expressions over the alphabet .
L(r1 )
Let L is any Regular Language obtained by L  (Quotient operator)
L(r2 )
Then the number of strings in the homomorphic image of L is_______
31. Ans: 1
Sol: L = {0}
h(L) = h(0) = ab
Find the quotient of L(r1) with L(r2)
Lr1 
Then we get L = = {0}
Lr2 
h(L) = h(0) = ab
h(L) is homomorphic image of L
|h(L)| = 1
Number of strings in Homomorphic image of L is 1.

n n  1
32. If the total number of inversions in an array of 'n' elements are then which of the
2
following statements are True for arranging array elements in the ascending order?
I. Insertion sort takes O(n2) time
II. Quick sort takes O(nlogn)
III. Merge sort takes O(nlogn)

(A) Only I, II (B) Only II, III


(C) Only I, III (D) I, II, and III
32. Ans: (C)
n n  1
Sol: If there are inversions in an array of 'n' elements then that array is in descending order, So
2
Insertion Sort takes O(n2), Merge Sort takes O(nlogn), Quick Sort takes O(n2).

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 30 : CSIT

Distractor Logic
Option A: If student thinks that, worst case time complexity of Quick Sort is O(nlogn) then
he can choose option (A)
Option B: If student thinks that Insertion Sort takes O(n) in worst case, and Quick Sort takes
O(nlogn) and Merge Sort takes O(nlogn)
Option C: Refer to solution
Option D: If student thinks that Quick Sort, and Merge Sort takes O(nlogn) time in worst
case.

33. int main( )


{
char str[ ] = "Lucknow";
char *P = str;
P = P + 3;
P[3] = 't';
printf("%s", str);
}
What is the output?
(A) Lucknot (B) Luctnow
(C) Luctnot (D) Lutknow
33. Ans: (A)
Sol:
0 1 2 3 4 5 6 7
str L u c k n o w '\0'
100 100
P
100

Step 1: P = P + 3; // P is pointing to 103


Step 2: P[3] = 't' // 'w' is replaced by 't'

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 31 : CSIT

Distractor Logic
Option A: Refer to Solution
Option B: If student thinks that P[3] = 't' will update the character 'k' as 't' then output
Luctnow.
Option C: If student thinks that 't' will be placed in the place of 'k' and 't' then output Luctnot
Option D: If student thinks that third character ‘c’ replaced by ‘t’ then output Lutknow

34. Match the following List -1 and List - II


List - I List - II
P. Merge Sort I. O(n2.81)
Q. Finding maximum key from max-heap II. O(nlogn)
R. Finding maximum and minimum of array elements III. O(1)
S. Straussen's matrix multiplication IV. O(n)
V. O(n2)
(A) P - III, Q - II, R - IV, S - V
(B) P - II, Q - III, R - IV, S - V
(C) P - II, Q - III, R - IV, S - I
(D) P - III, Q - IV, R - V, S -II
34. Ans: (C)
Sol:  Mergesort takes - O(nlogn)
 Finding maximum key from maxheap available at root so it takes O(1)
 Finding maximum and minimum of array element takes 1.5n – n = O(n)
 Straussens algorithm takes O(n2.81)
Distractor Logic
Option A: If student thinks
P - III Q - II R - IV S-V
Option B: If student thinks
P - II Q - III R - IV S-V
Option C: Refer to solution
Option D: If student thinks
P - III Q - IV R-V S -II
ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata

: 32 : CSIT

35. Identify valid statements


(i) The pair of IP addresses
130. 15. 129. 15/17 and
130. 15. 161. 30/17 belong to the same network
(ii) The pair of IP addresses
191. 203. 31.87/16 and
191. 230. 31.88/16 belong to the same network
(A) (i), (ii) are valid (B) (i) only valid
(C) (ii) only valid (D) Both are invalid
35. Ans: (B)
Sol: Statement (i)
130. 15. 129. 15/17
/17 = 255.255.128.0

IP (1) 130. 15. 129. 15


SM 255. 255. 128. 0
130. 15. 128. 0
129 = 1000 0001
128 = 1000 0000
1000 0000

IP (2) 130. 15. 161. 30


SM 255. 255. 128. 0
130. 15. 128. 0

161 = 1010 0001


128 = 1000 0000
1000 0000
Both belong to same network as NID of both IP addresses are same
Statement (ii) is wrong because
191.203.x.x 
 different networks
191.230.x.x 
ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata

: 33 : CSIT

36. A 16 way block set associative cache memory unit is designed with a capacity of 256 KB is built
using a block size of 32 words and word size is 16 bits. The size of the physical memory space is
1 GB. The number of bits for the tag field in it's physical address format is _______.
36. Ans: 16
Sol: Word size = 16 bits = 2 Bytes
Associativity = 16
Cache memory size = 256 KB = 128 K words
= 217 words
Physical memory size = 1 G byte = 230 Bytes = 229 words
Block size = 32 words = 25 words
Number of blocks in physical memory = 229/25 = 224
Number of blocks in cache memory = 217/25 = 212
212
Number of sets in cache   28
16
M
Tag field size  log 2 ,
S
Where, M = number of blocks in main memory,
S = number of sets in cache memory
2 24
 log 2 8  16
2

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 34 : CSIT

37. Consider the following grammar


S→aAd/bBd/aBe/bAe
A→c
B→c
The number of conflicting entries in the LALR(1) parse table constructed for the above grammar
is_______.
37. Ans: 2
Sol:

I0 I1
a
S1→.S, $ S→a.Ad, $
I3 On margins I3 and I4
S→.aAd, $ S→a.Be, $
c states we get a state
S→.bBd, $ A→.c,d A→c.,d
S→.aBe, $ B→.c, e B→c.,e
S→.bAe, $ b A→c.,d/e
S→b.Bd, $
I4 B→c.,d/e
c
S→b.Ae, $ A→c.,e
A→.c,e B→c.,d Which is R-R conflict, and
B→.c, d in parse table it is a conflict in
for d and e entries
I2

38. Let G = {3n | n  Z} where Z is set of all integers. Under the operation of multiplication, G is
______.
(A) a semi group but not a monoid.
(B) a monoid but not a group
(C) a group but not an abelian group
(D) an abelian group
38. Ans: (D)
Sol: Let a, b, c are any 3 integers.
3a . 3b = 3a+b  G  a, b  Z
 Multiplication is a closed operation on G.
The elements of G are rational numbers and multiplication of rational numbers is associative.
we have, 1 = 30  G and
ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata

: 35 : CSIT

3a . 30 = 3a aZ
 Identity element exists.
If n  Z then –n  Z.
For each element 3n  G we have 3–n  G such that
3n . 3–n = 30
 Each element of G has inverse in G.
Further, multiplication of rational numbers is commutative.
 G is an abelian group w.r.t multiplication

Distractor Logic
Option A: The given set is monoid with respective multiplication
 Option (A) is not true
Option B: The given set is a group with respective multiplication
 Option (B) is not true
Option C: The given set is abelian with respective multiplication
 Option (C) is not true
Option D: Refer to solution

39. Which of the following represents the degree sequence of a simple non-directed graph?
(A) {5, 4, 3, 2, 1} (B) {4, 4, 3, 2, 1}
(C) {4, 4, 3, 3, 3} (D) {3, 2, 2, 1, 0}
39. Ans: (D)
Sol: A simple graph for the sequence {3, 2, 2, 1, 0} is shown below

a
b

c d

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 36 : CSIT

Distractor Logic
Option A: In a simple graph with 5 vertices, degree of any vertex cannot be 5.
 The sequence cannot represent a simple graph
Option B: In a simple graph with 5 vertices, if we have two vertices with degree 4, then a
vertex with degree 1, is not possible
Option C: In a simple graph, the number of vertices with odd degree should be even.
Option D: Refer to solution

40. An instruction pipelined processor has five stages namely, instruction fetch (F), instruction decode
(D), Instruction execution (E), memory Access for operand (M) and write Back (W) with stage
latencies of 1 ns, 2ns, 2 ns, 1 ns, 1 ns respectively. To gain interms of frequency, the designer
decided to split the decoder stage into two stages D1 and D2 each of latency 1 ns and execute stage
into 3 stages E1, E2 and E3 stages each of latency 2ns/3.
A program has '100' instructions, all instructions use all stage services. The amount of time saved
(in ns) using new design over old design is __________.
40. Ans: 96
Sol: Old design: K = 5, Tseg = 2 ns, n = 100
tp = K + (n – 1) × Tseg = 5 + (99 × 2) = 203 ns

New design: K = 8, Tseg = 1ns, n = 100


tp = 8 + (99 × 1) = 107
Amount of time saved = (203 – 107) = 96 ns

41. Suppose that A and B be any two Regular Languages.


Let L1= A.B (concatenation of A, B)
L2 = Power set of L1
Consider the statements
(i) L1 is enumerable
(ii) L2 is Non-enumerable.

Choose the correct statements

(A) Only (i) is correct (B) Only (ii) is correct


(C) Both (i) and (ii) are correct (D) Neither (i) nor (ii) is correct
ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata

: 37 : CSIT

41. Ans: (C)


Sol: L1 = A.B = Concatenation of Regular Language
L1 is a Regular Language  enumerable
L1 is a countable set
L2 = 2 L1 (Power set of L1)
= uncountable
= Non-enumerable

Distractor Logic
Option A: L1 is enumerable. so (i) is correct
But (ii) is also correct.
Option (A) is not correct
Option B: (ii) is correct, but (i) is also correct
Option (B) is not correct.
Option C: Refer to solution
Option D: (i) and (ii) are correct
So option (D) is not correct

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 38 : CSIT

42. include <stdio.h>


void DisplayBits (int x);
int main( )
{
unsigned int n = 140;
n = n & (n – 1);
DisplayBits (n);
return 0;
}
void DisplayBits (int x)
{
int i, mask;
for(i = 31; i > = 0; i – –)
{
mask = 1 < < i;
putchar ((x & mask)? '1': '0');
if (i%8 = = 0)
putchar(' ');
}
printf("\n")
}
Assume that integer occupies '4' bytes, and for n = 140, then which of the following statement is
correct?
(A) It convert the rightmost '1' bit of an integer into '0' bit
(B) It convert the leftmost '1' bit of an integer into '0' bit
(C) It prints the given integer 'n' only
(D) It prints 1's complement of given integer
42. Ans: (A)
ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata

: 39 : CSIT

Sol: (140)2= 00000000 10001100


After executing the above program for given input n = 140, then the output is
0000000010001000
 It convert the Rightmost ‘1’ bit of an integer into ‘0’ bit
Distractor Logic
Option A: Refer to Solution
Option B: If we change leftmost ‘1’ bit into ‘0’ of an integer then output is option (B)
Option C: If student thinks that bitwise AND operator does not change the given integer.
Option D: If student thinks that it performs 1's complement of given integer.

43. Consider the recurrence relation an.an–2 – a 2n 1 = 0 with initial conditions a0 = 1 and a1 = 2. The
value of a12 = _________.
43. Ans: 4096
Sol: Given that, a n .a n 2  a 2n 1

a 2n 1
an 
a n 2
Taking logarithms, log an = 2 log an–1 – log an–2
Let log an = xn (say)
Now, xn = 2xn–1 – xn–2 = 0
 xn – 2xn–1 + xn–2 = 0
The characteristic equation is t2 – 2t + 1 = 0
 t = 1, 1
The solution is
xn = log an = (C1 + C2 n) ......... (1)
using initial conditions, we get
C1 = 0 and C2 = log 2
 log an = n log2 = log 2n
 an = 2n
 a12 = 212 = 4096

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 40 : CSIT

44. Consider a Doubly Linked List:

L A B C D R

Which of the following option print data 'C'?


(A) printf("%c", L  Rlink  Rlink  Llink  Llink  data);
(B) Printf("%c", L  Rlink  Llink  Llink  Rlink  data);
(C) Printf("%c", R  Llink  Llink  Rlink  data);
(D) Printf("%c", R  Llink  Llink  Rlink  Llink data);
44. Ans: (C)
Sol:
L A 10 5 B 15 10 C 20 15 D R
5 10 15 20
20 15 10 15
printf("%c", R  Llink  Llink  Rlink  data )
print C is valid

Distractor Logic
Option A: A 10 B 10 C 20 15 D
L 5 15 R
5 10 15 20
5 10 15 10 5
printf("%c", L  Rlink  Rlink  Llink  Llink  data )
A is printed
Option B: A
L 10 5 B 15 10 C 20 15 D R
5 10 15 20
5 10 5 Null
printf("%c", L  Rlink  Llink  Llink  Rlink  data ) so code dumped
Option C: Refer to solution
Option D:
L A 10 5 B 15 10 C 20 15 D R
5 10 15 20
20 15 10 15 10
printf("%c", R  Llink  Llink  Rlink  Llink  data )
print B
ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata

: 41 : CSIT

45. The counting sequence of the following counter is


Assume initially QA QB QC = 000

QA
JA QA JB QB JC QC
(MSB) (LSB)

KA QA KB QB KC QC
QA

Clock

(A) 0, 1, 3, 7, 6, 4, 0 (B) 0, 1, 3, 6, 7, 4, 0
(C) 0, 1, 3, 4, 6, 7, 0 (D) 0, 1, 3, 6, 4, 7, 0
45. Ans: (A)
Sol: Initially QA QB QC = 000
Given JA = QB ; JB = QC ; J C  QA

K A  QB ; K B  QC ; KC = QA

lock JA KA JB KB JC KC QA QB QC Decimal equivalent


0 - - - - - - 0 0 0  0
1 0 1 0 1 1 0 0 0 1  1
2 0 1 1 0 1 0 0 1 1  3
3 1 0 1 0 1 0 1 1 1  7
4 1 0 1 0 0 1 1 1 0  6
5 1 0 0 1 0 1 1 0 0  4
6 0 1 0 1 0 1 0 0 0  0

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 42 : CSIT

Distractor Logic
Option A: Refer to solution
Option B: At 4th clock, the output should be 7 but here 6
Option C: At 4th clock, the output should be 7 but here 4
Option D: At 4th clock, the output should be 7 but here 6

46. void func1(char X[ ]);


void func2(char X[ ]);
void main( )
{
char arr[5];
func1 (arr);
puts (arr);
func2(arr);
puts (arr);
return 0;
}
void func1 (char X[ ])
{
X = "Jack";
puts (X) ;
}
void func2 (char X[ ])
{
X[0] = 'J';
X[1] = 'i';
X[2] = 'l';
X[3] = '1';
X[4] = '\0';
puts(X)'
}

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 43 : CSIT

What is the output of the above program?


(A) Jack, garbage values, Jill, Jill (B) Jack, Jill
(C) Jack, garbage values, Jill (D) Jack, Jack, Jill
46. Ans: (A)
Sol: In the first function call, the array 'arr' address is passed to the variable 'X' and 'X' is pointing to
"arr", but after sometime 'X' is assigned to "Jack" so first printf prints "Jack". After leaving the
called function, puts(arr) prints garbage values. When func2(arr) is called then we are updating
content of "arr". So output Jill, Jill.
Distractor Logic
Option A: Refer to Solution
Option B: If student thinks that, in two function calls the printed outputs are Jack, Jill
respectively.
Option C: If student does not observe, last puts then this output printed.
Option D: If student does not know the concept of pointer to string and he assume that
second function call does not effect output.

47. Let A and B be two finite alphabets and let # be a symbol outside both A and B. Let f be a total
function from A* to B*. We say f is computable if there exists a Turing machine M which gives an
input x in A*, may halt with f(x) on its tape.
Let Lf denote the language {x#f(x) | x A*}.

Which of the following statements is true:

(A) If 'f ' is computable if and only if Lf is recursive


(B) If 'f ' is computable if and only if Lf is recursively enumerable
(C) If 'f ' is computable then Lf is recursive, but not conversely
(D) If 'f ' is computable then Lf is recursively enumerable, but not conversely
47. Ans: (B)
Sol: As we know that a language L is said to be recursive enumerable iff a TM may or may not halts
on all strings of L. Here also Turing Machine may or may not halts on given input x in A with f(x)
on its tape.

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 44 : CSIT

Turing machine may or may not halts with f(x) on the tape.
So, Lf is REL.
Distractor Logic
Option A: Turing Machine does not halt for every member. So it is not effective computable.
So Lf is not recursive
Option B: As Lf is REL then it is computable
Option C: Computable implies recursive but recursive need not imply computability
Option D: If f is computable then Lf can be REL but REL may not represent computing.

48. A magnetic memory surface has 16 tracks, each track has 32 sectors and each sector has 128 bytes
of data storage capacity. Total storage capacity of the surface is 64 K Bytes from B0 to B65535.
Address of Byte Bx is (TP SQ BR) where TP is the Pth track number and SQ is the Qth sector number
and BR is the Rth byte number in binary. Byte number B0 is addressed as (0, 0 , 0), Byte number
B1 is addressed as (0, 0, 1) and so on.
The 16 bit address of a byte Bx is (A 3 9 5)16. Then it's P, Q, R values respectively (in decimal) are
(A) 10, 21, 7 (B) 10, 7, 21
(C) 21, 7, 10 (D) 7, 21, 10
48. Ans: (B)
Sol: Number of tracks = 24 (0 0 0 02 to 11112) (0 to 15)10
Number of sectors = 25 (0 0 0 0 02 to 111112) (0 to 31)10
Number of Bytes = 27 (0 0 0 0 0 0 02 to 1 1 1 1 1 1 12) (0 to 127)
Word address size is 16 bit, range is 0 0 0 0 H → B0
to
F F F F H → B65535
Given address is (A 3 9 5)16
1010 0011 1 001 0101
T10 S7 B21
4 bit  5 bit  7 bit 
Track number is '10'
Sector number is 7
And byte number is 21
ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata

: 45 : CSIT

49. Consider a 32 bit virtual address for a 2- level paging system, with an 8KB page size. The outer
page table has 1024 entries. The number of bits are used to represent second-level page table is
__________.
49. Ans: 9
Sol: With paging the format of V.A is P/D P = page number, D = offset
Since outer P.T has 1024 entries, 10 bits are needed to index, page size of V.A is 8KB which
needs 13 bit offset. VA is 32 bits. Hence the remaining bits are needed for 2nd level

P1 P2 D
P.T 10 9 13 = 32 bits

50. The Boolean function f(A, B, C, D) = m(0, 1, 4, 6, 7, 8, 10, 14, 15). The number of Prime
Implicants and Essential Prime Implicants respectively are
(A) 6, 1 (B) 6, 2
(C) 7, 1 (D) 7, 2
50. Ans: (D)
Sol:
CD EPI
AB
1 1 EPI

1 1 1
1 1
1 1

So, PI are 7
EPI are 2

Distractor Logic
Option A: Total PI = 7 ; EPI = 2 so in this option one PI, one EPI are missing
Option B: Here one PI is missing
Option C: Here one EPI is missing
Option D: Here PI = 7; EPI = 2 hence correct

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 46 : CSIT

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 47 : CSIT

51. Let D36 = set of all positive divisors of 36. A relation R on D36 is defined by a R b  a is a divisor
of b. In the lattice [D36 ; R] the complement of 4 is _______.
51. Ans: 9
Sol: D36 = {1, 2, 3, 4, 6, 9, 12, 18, 36}
Let x be the complement of 4.
lub of 4 and x = L.C.M of 4 and x = 36
and glb of 4 and x = G.C.D of 4 and x = 1
x=9

52. Consider the following multiplexer circuit

C I0
I1 F1
MUX1
I2
I3 S1 S0

A B F

C I0
I1
MUX 2
I2 F2
I3 S1 S0

A B

The output [F] of the above circuit is _______.


52. Ans: 1
Sol: Output of MUX 1 is F1  A B .C  A BC  A B C  AB C
F1 (A, B, C) = m(1, 3, 4, 6)
Output of MUX 2 is F2  A B C  A B C  A B C  ABC
F2 (A, B, C) = m(0, 2, 5, 7)

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 48 : CSIT

From F1, F2 we can say that missing terms in F1 are present in F2 hence F1, F2 are complement to
each other. So, F1 . F2 = 0
But F  F1 .F2.  0  1 hence F = 1

53. Use the following tables for the below query where Table1 and Table2 are used :

Table 1 Table 2
T1A T1B T2A T2B T2C
a aa a a a
b bb b a null
c cc

Select *
From Table1
Where T1A = all (Select T2B
From Table2)
Where T2B>= 'b')

_________ number of rows will be there in the output.


53. Ans: 3
Sol: all (empty set) returns true always.

54. Consider the following relation schema


supplier (sid, sname, rating)
supply (sid, partid, qty)
parts (partid, partname, color)
select sname
from supplier
where sid not in (select sid from supply where partid in
(select partid from parts where color <>'Blue'))
What is the result of above query?
ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata

: 49 : CSIT

(A) Name of the suppliers who supply only blue parts.


(B) Name of the suppliers who supply blue parts.
(C) Name of the suppliers who supply non-blue parts.
(D) Name of the supplier who supply only non-blue parts.
54. Ans: (A)
Sol: The inner most query find partid of parts whose color is non-blue and the outer query find name of
the suppliers who supply only blue parts.
Distractor Logic
Option A: Refer to solution
Option B: If not operator in outer query and < > operator in inner most query non present,
then the result will be option (B)
Option C: If not operator in outer query is not present then the result will be option (C)
Option D: If not operator is present in second inner query the result will be option (D).

55. Identify the correct search sequence to search for 25 in Binary Search Tree?
(A) 100, 5, 55, 8, 20, 60, 22, 28, 25
(B) 5, 15, 200, 150, 3, 30, 39, 49, 25
(C) 1, 2, 3, 13, 39, 15, 28, 45, 25
(D) 10, 100, 50, 20, 40, 30, 21, 23, 25
55. Ans: (D)
Sol: Valid 10

100

50

20

40

30

21

23

25

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 50 : CSIT

Distractor Logic
Option A:

100

55

8
wrong
20

60

60 Cannot be in left subtree of 55

Option B:

15

200

150
wrong

3 Cannot be in the right subtree of 15


ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata

: 51 : CSIT

Option C:

13

39

15

28

45

45 Cannot be in the left subtree of 39

Option D: Refer to Solution.

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata



: 52 : CSIT

ACE Engineering Academy Hyderabad|Delhi|Bhopal|Pune|Bhubaneswar| Lucknow|Patna|Bengaluru|Chennai|Vijayawada|Vizag |Tirupati | Kukatpally| Kolkata

You might also like