# Recent questions tagged gate2012-cse

1
Consider the following C code segment. int a, b, c = 0; void prtFun(void); main() { static int a = 1; /* Line 1 */ prtFun(); a += 1; prtFun(); printf( \n %d %d , a, b); } void prtFun(void) { static int a = 2; /* Line 2 */ int b = 1; a += ++b; printf( \n %d %d , a, ... $\begin{array}{ll} \text{4} & \text{2} \\ \text{4} & \text{2} \\ \text{2} & \text{0} \\ \end{array}$
2
Consider the following relations $A, B$ and $C:$ ... following SQL query contain? SELECT A.Id FROM A WHERE A.Age > ALL (SELECT B.Age FROM B WHERE B.Name = Arun') $4$ $3$ $0$ $1$
3
For the grammar below, a partial $LL(1)$ parsing table is also presented along with the grammar. Entries that need to be filled are indicated as $E1, E2,$ and $E3$. $\varepsilon$ is the empty string, \$indicates end of input, and,$ ... $E2 : B \rightarrow S, S \rightarrow \varepsilon$ $E3 : B \rightarrow S$
4
A computer has a $256$-$\text{KByte}$, 4-way set associative, write back data cache with block size of $32$ $\text{Bytes}$. The processor sends $32$ $\text{bit}$ addresses to the cache controller. Each cache tag directory entry contains, in addition to address tag, $2$ valid bits, ... of the cache tag directory is: $160$ $\text{Kbits}$ $136$ $\text{Kbits}$ $40$ $\text{Kbits}$ $32$ $\text{Kbits}$
5
Given the sequence of terms, $AD$ $CG$ $FK$ $JP$, the next term is $OV$ $OW$ $PV$ $PW$
6
Which of the following assertions are CORRECT? P: Adding $7$ to each entry in a list adds $7$ to the mean of the list Q: Adding $7$ to each entry in a list adds $7$ to the standard deviation of the list R: Doubling each entry in a list doubles the mean of the list S: Doubling each entry in a list leaves the standard deviation of the list unchanged $P$, $Q$ $Q$, $R$ $P$, $R$ $R$, $S$
7
An automobile plant contracted to buy shock absorbers from two suppliers $X$ and $Y$ . $X$ supplies $60\%$ and Y supplies $40\%$ of the shock absorbers. All shock absorbers are subjected to a quality test. The ones that pass the quality test are considered reliable. Of $X's$ ... a randomly chosen shock absorber, which is found to be reliable, is made by $Y$ is $0.288$ $0.334$ $0.667$ $0.720$
8
A political party orders an arch for the entrance to the ground in which the annual convention is being held. The profile of the arch follows the equation $y=2x-0.1x^{2}$ where $y$ is the height of the arch in meters. The maximum possible height of the arch is $8$ meters $10$ meters $12$ meters $14$ meters
9
Wanted Temporary, Part-time persons for the post of Field Interviewer to conduct personal interviews to collect and collate economic data. Requirements: High School-pass, must be available for Day, Evening and Saturday work. Transportation paid, ... the best inference from the above advertisement? Gender-discriminatory Xenophobic Not designed to make the post attractive Not gender-discriminatory
10
Choose the most appropriate alternative from the options given below to complete the following sentence: Suresh’s dog is the one ________ was hurt in the stampede. that which who whom
11
Choose the grammatically INCORRECT sentence: They gave us the money back less the service charges of Three Hundred rupees. This country’s expenditure is not less than that of Bangladesh. The committee initially asked for a funding of Fifty Lakh rupees, but later settled for a lesser sum. This country’s expenditure on educational reforms is very less.
12
Which one of the following options is the closest in meaning to the word given below? Mitigate Diminish Divulge Dedicate Denote
13
Choose the most appropriate alternative from the options given below to complete the following sentence: Despite several _________ the mission succeeded in its attempt to resolve the conflict. attempts setbacks meetings delegations
14
The cost function for a product in a firm is given by $5q^{2}$, where $q$ is the amount of production. The firm can sell the product at a market price of $₹ 50$ per unit. The number of units to be produced by the firm such that the profit is maximized is $5$ $10$ $15$ $25$
15
A computer has a $256\text{-KByte}$, 4-way set associative, write back data cache with block size of $32\text{-Bytes}$. The processor sends $32\text{-bit}$ addresses to the cache controller. Each cache tag directory entry contains, in addition to address tag, $2$ valid bits, $1$ modified bit and $1$ replacement bit. The number of bits in the tag field of an address is $11$ $14$ $16$ $27$
16
For the grammar below, a partial $LL(1)$ parsing table is also presented along with the grammar. Entries that need to be filled are indicated as $E1, E2,$ and $E3$. $\varepsilon$ is the empty string, \$indicates end of input, and,$\mid$separates alternate right hand sides of productions.$ S\rightarrow a ... $\text{FOLLOW}(A) = \{a, b\}$ $\text{FOLLOW}(B) =\{a, b\}$
17
Consider the following relations $A, B$ and $C:$ ... of $A\cup B$ is the same as that of $A$. $(A\cup B)\bowtie _{A.Id > 40 \vee C.Id < 15} C$ $7$ $4$ $5$ $9$
18
Consider the following C code segment. int a, b, c = 0; void prtFun(void); main() { static int a = 1; /* Line 1 */ prtFun(); a += 1; prtFun(); printf( \n %d %d , a, b); } void prtFun(void) { static int a = 2; /* Line 2 */ int b = 1; a += ++b; printf( \n %d %d , a, b); } What ... $\begin{array}{lll} 3 & & 1 & \\ 5 & & 2 & \\ 5 & & 2 & \end{array}$
19
The height of a tree is defined as the number of edges on the longest path in the tree. The function shown in the pseudo-code below is invoked as height (root) to compute the height of a binary tree rooted at the tree pointer root. int height(treeptr n) { if(n == NULL) return -1; if(n -> left == ... $\max(h1, h2)$ B1: $(1+ \text{height}(n \to \text{ right}))$ ; B2: $\max(h1, h2)$
20
Consider the set of strings on $\{0,1\}$ in which, every substring of $3$ symbols has at most two zeros. For example, $001110$ and $011001$ are in the language, but $100010$ is not. All strings of length less than $3$ are also in the language. A partially completed DFA that accepts this ...
21
Consider an instance of TCP’s Additive Increase Multiplicative Decrease (AIMD) algorithm where the window size at the start of the slow start phase is $2$ MSS and the threshold at the start of the first transmission is $8$ MSS. Assume that a timeout occurs during the fifth transmission. Find the congestion window size at the end of the tenth transmission. $8$ MSS $14$ MSS $7$ MSS $12$ MSS
22
Consider a source computer $(S)$ transmitting a file of size $10^{6}$ bits to a destination computer $(D)$ over a network of two routers $(R_{1}\text{ and }R_{2})$ and three links $(L_{1},L_{2},\text{ and } L_{3})$. $L_{1}$ connects $S$ to $R_{1}$; ... transmission and propagation delays in transmitting the file from $S$ to $D$? $\text{1005 ms}$ $\text{1010 ms}$ $\text{3000 ms}$ $\text{3003 ms}$
23
Suppose $R_{1} (\underline{A}, B)$ and $R_{2} (\underline{C}, D)$ are two relation schemas. Let $r_{1}$ and $r_{2}$ be the corresponding relation instances. $B$ is a foreign key that refers to $C$ in $R_{2}$. If data in $r_{1}$ and $r_{2}$ satisfy referential integrity constraints, ... $\prod_{B}(r_{1}) = \prod _{C}(r_{2})$ $\prod_{B}(r_{1}) - \prod _{C}(r_{2}) \neq \varnothing$
24
Consider the virtual page reference string $\text{1, 2, 3, 2, 4, 1, 3, 2, 4, 1}$ on a demand paged virtual memory system running on a computer system that has main memory size of $3$ page frames which are initially empty. Let $\text{LRU}$, $\text{FIFO}$ and $\text{OPTIMAL}$ ... $\text{OPTIMAL} < \text{FIFO} < \text{LRU}$ $\text{OPTIMAL} = \text{LRU}$ $\text{OPTIMAL} = \text{FIFO}$
25
A file system with $300$ GByte disk uses a file descriptor with $8$ direct block addresses, $1$ indirect block address and $1$ doubly indirect block address. The size of each disk block is $128$ Bytes and the size of each disk block address is $8$ Bytes. The maximum possible file size in this file system is $3$ KBytes $35$ KBytes $280$ KBytes ​​​​​​​dependent on the size of the disk
26
Consider the directed graph shown in the figure below. There are multiple shortest paths between vertices $S$ and $T$. Which one will be reported by Dijkstra’s shortest path algorithm? Assume that, in any iteration, the shortest path to a vertex $v$ is updated only when a strictly shorter path to $v$ is discovered. $\text{SDT}$ $\text{SBDT}$ $\text{SACDT}$ $\text{SACET}$
27
A list of $n$ strings, each of length $n$, is sorted into lexicographic order using the merge-sort algorithm. The worst case running time of this computation is $O (n \log n)$ $O(n^{2} \log n)$ $O(n^{2} + \log n)$ $O(n^{2})$
How many onto (or surjective) functions are there from an $n$-element $(n ≥ 2)$ set to a $2$-element set? $2^{n}$ $2^{n} – 1$ $2^{n} – 2$ $2(2^{n} – 2)$
Suppose a circular queue of capacity $(n −1)$ elements is implemented with an array of $n$ elements. Assume that the insertion and deletion operations are carried out using REAR and FRONT as array index variables, respectively. Initially, $REAR = FRONT = 0$. The conditions to detect queue full and ... $(REAR+1) \mod n == FRONT$ full: $(FRONT+1) \mod n == REAR$ empty: $REAR == FRONT$