Recent questions tagged gateit-2007

50 50 votes
6 answers 6 answers
17.6k
17.6k views
Synchronization in the classical readers and writers problem can be achieved through use of semaphores. In the following incomplete code for readers-writers problem, two ...
7 7 votes
4 answers 4 answers
8.2k
8.2k views
Consider the following pseudo-code:IF ((A B) AND (C D)) THEN A = A + 1 B = B + 1 ENDIFThe cyclomatic complexity of the pseudo-code is2345
1 1 vote
2 answers 2 answers
2.0k
2.0k views
Consider the CPM activity chart where an arc connecting two milestones is labeled with a task identifier and the time taken in days. For example in order to go from A to ...
2 2 votes
1 answers 1 answer
2.8k
2.8k views
In the simplified flowchart given below, the shaded boxes represent code that is executed during a test case.The Branch coverage is3/42/31/23/8
0 0 votes
2 answers 2 answers
1.4k
1.4k views
Given the following algorithm for sorting an array X and N numbers: SUBROUTINE SHORT (X, N) IF (N < 2) RETURN FOR (i = 2) TO N INCREMENT BY 1) FOR (j = 1)...
1 1 vote
2 answers 2 answers
3.2k
3.2k views
The following table shows the time between failures for a software system.Error Number12345Time since last failure(hours)64856The reliability of the system for one hour o...
95 95 votes
8 answers 8 answers
27.2k
27.2k views
Consider the following finite automata $P$ and $Q$ over the alphabet $\{a, b, c\}$. The start states are indicated by a double arrow and final states are indicated by a d...
92 92 votes
3 answers 3 answers
24.5k
24.5k views
Consider the following grammars. Names representing terminals have been specified in capital letters.$$\begin{array}{|llll|}\hline G1 : & \text{stmnt} & \rightarrow & \...
40 40 votes
2 answers 2 answers
12.7k
12.7k views
Consider the grammar given below:$S \rightarrow x \ B \mid y \ A$$A \rightarrow x \mid x \ S \mid y \ A \ A$$B \rightarrow y \mid y \ S \mid...
42 42 votes
10 answers 10 answers
11.6k
11.6k views
Consider the following DFA in which $S_0$ is the start state and $S_1$, $S_3$ are the final states.What language does this $\textsf{DFA}$ recognize?All strings of $x$ and...
35 35 votes
6 answers 6 answers
10.4k
10.4k views
The two grammars given below generate a language over the alphabet $\{x, y, z\}$$G1 : S \rightarrow x \mid z \mid x \ S \mid z \ S \mid y \ B$$\qquad B \rightarrow y \...
54 54 votes
10 answers 10 answers
19.8k
19.8k views
The line $T$ in the following figure is permanently connected to the ground.Which of the following inputs $(X_1 X_2 X_3 X_4)$ will detect the fault ?$0000$$0111$$1111$Non...
94 94 votes
7 answers 7 answers
36.5k
36.5k views
A hard disk system has the following parameters :Number of tracks $= 500$Number of sectors/track $= 100$Number of bytes /sector $= 500$Time taken by the head to move from...
53 53 votes
8 answers 8 answers
37.1k
37.1k views
An error correcting code has the following code words: $00000000, 00001111, 01010101, 10101010, 11110000$. What is the maximum number of bit errors that can be corrected?...
49 49 votes
3 answers 3 answers
12.9k
12.9k views
$(C012.25)_H - (10111001110.101)_B =$$(135103.412)_o$$(564411.412)_o$$(564411.205)_o$$(135103.205)_o$
82 82 votes
6 answers 6 answers
45.9k
45.9k views
Following table indicates the latencies of operations between the instruction producing the result and instruction using the result.$$\begin{array}{|l|l|c|} \hline \textb...
29 29 votes
6 answers 6 answers
11.3k
11.3k views
What is the final value stored in the linear feedback shift register if the input is $101101$?$0110$$1011$$1101$$1111$
41 41 votes
3 answers 3 answers
10.6k
10.6k views
Data forwarding techniques can be used to speed up the operation in presence of data dependencies. Consider the following replacements of LHS with RHS. $R1→ Loc, Loc→ R2 ...
36 36 votes
2 answers 2 answers
11.0k
11.0k views
The following expression was to be realized using $2$-input AND and OR gates. However, during the fabrication all $2$-input AND gates were mistakenly substituted by $2$-i...
30 30 votes
3 answers 3 answers
13.2k
13.2k views
Consider a Direct Mapped Cache with 8 cache blocks (numbered $0-7$). If the memory block requests are in the following order$3, 5, 2, 8, 0, 63, 9,16, 20, 17, 25, 18, 30, ...
40 40 votes
2 answers 2 answers
9.4k
9.4k views
The floating point unit of a processor using a design $D$ takes $2t$ cycles compared to $t$ cycles taken by the fixed point unit. There are two more design suggestions $D...
7 7 votes
1 answers 1 answer
6.7k
6.7k views
Early binding refers to a binding performed at compile time and late binding refers to a binding performed at execution time. Consider the following statements:Static sco...
31 31 votes
5 answers 5 answers
12.8k
12.8k views
Consider the program below in a hypothetical programming language which allows global variables and a choice of static or dynamic scoping.int i; program main() { i = 10; ...
30 30 votes
1 answers 1 answer
11.6k
11.6k views
Consider the program below in a hypothetical language which allows global variable and a choice of call by reference or call by value methods of parameter passing. ...
34 34 votes
2 answers 2 answers
11.5k
11.5k views
Consider the following C program: #include <stdio.h #define EOF -1 void push (int); /* push the argument on the stack */ int pop (void); /* pop the top of the stack */ vo...
49 49 votes
5 answers 5 answers
17.9k
17.9k views
Consider the C program given below : #include <stdio.h int main () { int sum = 0, maxsum = 0, i, n = 6; int a [] = {2, -2, -1, 3, 4, 2}; for (i = 0; i < n; i++) { if (i =...
52 52 votes
11 answers 11 answers
25.0k
25.0k views
Suppose you are given an implementation of a queue of integers. The operations that can be performed on the queue are:$\text{isEmpty (Q)}$ — returns true if the queue is ...
260 260 votes
19 answers 19 answers
62.0k
62.0k views
When searching for the key value $60$ in a binary search tree, nodes containing the key values $10, 20, 40, 50, 70, 80, 90$ are traversed, not necessarily in the order gi...
105 105 votes
13 answers 13 answers
47.1k
47.1k views
Consider a hash function that distributes keys uniformly. The hash table size is $20$. After hashing of how many keys will the probability that any new key hashed collide...
77 77 votes
5 answers 5 answers
21.0k
21.0k views
The function f is defined as follows:int f (int n) { if (n <= 1) return 1; else if (n % 2 == 0) return f(n/2); else return f(3n - 1); }Assuming that arbitrarily large int...