__TEST DATE: 04-12-2019__
1.
Consider the language

*L =*{*a*} on Î£ = {^{n}b^{n-3}| n>2*a, b*}. Which one of the following grammars generates the language*L*?
(1)

*S → aA | a, A → aAb | b*(2)*S → aaA | Î», A → aAb | Î»*
(3)

*S → aaaA | a, A → aAb | Î»*(4)*S → aaaA | Î», A → aAb | Î»*
Answer:
4

2.
A computer uses a memory unit of 512 K words
of 32 bits each. A binary instruction code is stored in one word of the memory.
The instruction has four parts: an addressing mode field to specify one of the
two-addressing mode (direct and indirect), an operation code, a register code
part to specify one of the 256 registers and an address part. How many bits are
there in addressing mode part, opcode part, register code part and the address
part?

(1) 1, 3, 9,
19 (2) 1, 4, 9, 18

(3) 1, 4, 8,
19 (4) 1, 3, 8, 20

Answer:
3

3.
What is the output of following C program?

# include<stdio.h>

main( )

{

int
i, j, x = 0;

for
(i = 0; i < 5; ++i)

for
(j = 0; j < i; ++j)

{

x
+ = (i + j – 1);

break;

}

printf
(“%d”,x) ;

}

(1) 6 (2) 5 (3) 4 (4)
3

Answer:
1

4.
Consider the following languages:

*L1*= {

*a*} ∪ {

^{n}b^{n}c^{m}*a*},

^{n}b^{m}c^{m}*n, m ≥ 0*

*L2*= {Ï‰Ï‰

^{R}| Ï‰∈{a, b}*} Where R represents reversible operation.

Which one of
the following is (are) inherently ambiguous language(s)?

(1) only

*L1*(2) only*L2*
(3) both

*L1*and*L2*(4) neither*L1*nor*L2*
Answer:
1

5.
A fuzzy conjunction operators, t(x,y), and a
fuzzy disjunction operator, s(x,y), from a pair if they satisfy:

Answer:
2

6.
Which of the following statements are true
regarding C++?

(a)
Overloading gives the capability to an existing operator to operate on other
data types.

(b)
Inheritance in object oriented programming provides support to reusability.

(c) When
object of a derived class is defined, first the constructor of derived class is
executed then constructor of a base class is executed.

(d)
Overloading is a type of polymorphism.

Choose the
correct option from those given below:

(1) (a) and
(b) only (2) (a), (b) and (c) only

(3) (a), (b)
and (d) only (4) (b),
(c) and (d) only

Answer:
3

7.
Which of the following class of IP address
has the last address as 223.255.255.255?

(1) Class A (2) Class B

(3) Class C (4) Class D

Answer:
3

8.
Let A = (001, 0011, 11, 101} and B = (01,
111, 111, 010}. Similarly, let C = {00, 001, 1000} and D = {0, 11, 011}.

Which of the
following pairs have a post-correspondence solution?

(1) Only
pair (A, B) (2) Only pair (C, D)

(3) Both (A,
B) and (C, D) (4) Neither (A, B) nor (C, D)

Answer:
1

9.
The sequence diagram given in Figure 1 for
the Weather Information System takes place when an external system requests the
summarized data from the weather station.

(1) Sat
comms → Weather station → Comms link → Weather data

(2) Sat
comms → Comms link → Weather station → Weather data

(3) Weather
data → Comms link → Weather station → Sat Comms

(4) Weather
data → Weather station → Comms link → Sat Comms

Answer:
Marks to all

10. A
counting semaphore is initialized to 8. 3 wait() operations and 4 signal()
operations are applied. Find the current value of semaphore variable.

(1) 9 (2) 5 (3) 1 (4)
4

Answer:
1

11. Consider
the following Linear programming problem (LPP):

Maximize z =
x

_{1}+ x_{2}
Subject to
the constraints:

x

_{1}+2x_{2}≤ 2000
x

_{1}+x_{2}≤ 1500
x

_{2}≤ 600
and x

_{1}, x_{2}≥ 0
The solution
of the above LPP is:

(1) x

_{1}=750, x_{2}=750, z=1500 (2) x_{1}=500, x_{2}=1000, z=1500
(3) x

_{1}=1000, x_{2}=500, z=1500 (4) x_{1}=900, x_{2}=600, z=1500
Answer:
3

12. Which
of the following CPU scheduling algorithms is/are supported by LINUX operating
system?

(1) Non-preemptive
priority scheduling

(2) Preemptive
priority scheduling and time sharing CPU scheduling

(3) Time sharing
scheduling only

(4) Priority
scheduling only

Answer:
2

13. Which
tag is used to enclose any number of javascript statements in HTML document?

(1) <code> (2) <script>

(3) <title> (4) <body>

Answer:
2

14. When
using Dijkstra’s algorithm to find shortest path in a graph, which of the
following statement is

__not__true?
(1) It can
find shortest path within the same graph data structure

(2) Every
time a new node is visited, we choose the node with smallest known

distance/cost
(weight) to visit first

(3) Shortest
path always passes through least number of vertices

(4) The
graph needs to have a non-negative weight on every edge

Answer:
3

15. Consider
the following statements with respect to duality in LPP:

(a) The
final simplex table giving optimal solution of the primal also contains optimal

solution
of its dual in itself.

(b) If
either the primal or the dual problem has a finite optimal solution, then the
other

problem
also has a finite optimal solution.

(c) If
either problem has an unbounded optimum solution, then the other problem has no

feasible
solution at all.

Which of the
statements is (are) correct?

(1) only (a)
and (b) (2) only (a) and (c)

(3) only (b)
and (c) (4) (a), (b) and (c)

Answer:
4

16. Given
two tables EMPLOYEE (EID, ENAME,
DEPTNO)

DEPARTMENT
(DEPTNO. DEPTNAME)

Find the
most appropriate statement of the given query:

Select count
(*) ‘total’

from
EMPLOYEE

where DEPTNO
IN (D1, D2)

group by
DEPTNO

having count
(*) > 5

(1) Total
number of employees in each department D1 and D2

(2) Total
number of employees of department D1 and D2 if their total is >5

(3) Display
total number of employees in both departments D1 and D2

(4) The
output of the query must have atleast two rows

Answer:
2

17. In
a B-Tree, each node represents a disk block. Suppose one block holds 8192
bytes. Each key uses 32 bytes. In a B-tree of order M there are M – 1 keys.
Since each branch is on another disk block, we assume a branch is of 4 bytes.
The total memory requirement for a non-leaf node is

(1) 32 M –
32 (2) 36 M – 32

(3) 36 M – 36 (4) 32 M – 36

Answer:
2

18. Let
G = (V, T, S, P) be any context-free grammar without any Î»-productions or unit
productions. Let K be the maximum number of symbols on the right of any
production in P. The maximum number of production rules for any equivalent
grammar in Chomsky normal form is given by:

(1) (K – 1)
|P| + |T| - 1 (2) (K –
1) |P| +|T|

(3) K |P| +
|T| - 1 (4) K
|P| + |T|

Where | |
denotes the cardinality of the set.

Answer:
2

19. Given
following equation:

(142)

_{b}+ (112)_{b-2}= (75)_{8}. Find base b.
(1) 3 (2) 6 (3) 7 (4)
5

Answer:
4

20. A
micro instruction format has micro operation field which is divided into 2
subfields F1 and F2, each having 15 distinct micro operations, condition field
CD for four status bits, branch field BR having four options used in
conjunction with address field AD. The address space is of 128 memory words.
The size of micro instruction is:

(1) 19 (2) 18 (3) 17 (4) 20

Answer:
1

## 1 Comments

Are all answers correct and cross checked with the official ans keys?

ReplyDelete