11.
Let p, q, r denote the statements “It is
raining”, “It is cold”, and “It is pleasant”, respectively. Then the statement
“It is not raining and it is pleasant, and it is not pleasant only if it is
raining and it is cold” is represented by
(A) (¬p á´§ r)
á´§ (¬r→(p á´§ q))
(B) (¬p á´§ r)
á´§ ((p á´§ q)→¬r)
(C) (¬p á´§ r)
á´ ((p á´§ q)→¬r)
(D) (¬p á´§ r)
v (r→(p á´§ q))
Answer: A
12. Given
the following binary number in 32-bit (single precision) IEEE-754 format:
00111110011011010000000000000000
The decimal
value closest to this floating-point number is
(A) 1.45 x
101
(B) 1.45 x 10-1
(C) 2.27 x
10-1
(D) 2.27 x
101
Answer: C
13. A
circular queue has been implemented using a singly linked list where each node
consists of a value and a single pointer pointing to the next node. We maintain
exactly two external pointers FRONT and REAR pointing to the front node and the
rear node of the queue, respectively. Which of the following statements is/are
CORRECT for such a circular queue, so that insertion and deletion operations
can be performed in O(1) time?
I. Next
pointer of front node points to the rear node.
II. Next
pointer of rear node points to the front node.
(A) I only
(B) II only
(C) Both I
and II
(D) Neither
I nor II
Answer: B
14. Consider
the following function implemented in C:
void
printxy(int x, int y) {
int
*ptr;
x
= 0;
ptr
= &x;
y
= *ptr;
*ptr
= 1;
printf(“%d,%d”,x,y);
}
The output
of invoking printxy (1, 1) is
(A) 0, 0
(B) 0, 1
(C) 1, 0
(D) 1, 1
Answer: C
15. The
Breadth First Search (BFS) algorithm has been implemented using the queue data
structure. Which one of the following is a possible order of visiting the nodes
in the graph below?
(A) MNOPQR
(B) NQMPOR
(C) QMNROP
(D) POQNMR
Answer: D
16. Identify
the language generated by the following grammar, where S is the stall variable.
S → XY
X → aX | a
Y → aYb | ε
(A) {ambn
| m ≥ n, n > 0}
(B) {ambn
| m ≥ n, n ≥ 0}
(C) {ambn
| m > n, n ≥ 0}
(D) {ambn
| m > n, n > 0}
Answer: C
17. An
ER model of a database consists of entity types A and B. These are connected by
a relationship R which does not have its own attribute. Under which one of the
following conditions, can the relational table for R be merged with that of A?
(A)
Relationship R is one-to-many and the participation of A in R is total.
(B)
Relationship R is one-to-many and the participation of A in R is partial.
(C)
Relationship R is many-to-one and the participation of A in R is total.
(D)
Relationship R is many-to-one and the participation of A in R is partial.
Answer: C
18. Consider
socket API on a Linux machine that supports connected UDP sockets. A connected
UDP socket is a UDP socket on which connect function has already been
called. Which of the following statements is/are CORRECT?
I. A
connected UDP socket can be used to communicate with multiple peers simultaneously.
II. A
process can successfully call connect function again for an already
connected UDP socket.
(A) I only
(B) II only
(C) Both I
and II
(D) Neither
I nor II
Answer: B
19. Consider
the following tables T1 and T2.
In table T1,
P is the primary key and Q is the foreign key referencing R in table T2 with on-delete
cascade and on-update cascade. In table T2, R is the primary key and S is the
foreign key referencing P in table T1 with on-delete set NULL and on-update
cascade. In order to delete record (3, 8) from table T1, the number of
additional records that need to be deleted from table T1 is
....................
Answer: 0.0
20. The
maximum number of IPv4 router addresses that can be listed in the record route
(RR) option field of an lPv4 header is ................
Answer: 9.0
0 Comments