5 votes
3
Consider the following program module:int module1 (int x, int y) { while (x! = y) { if (x y) x = x - y, else y = y - x; } return x; }What is Cyclomatic complexity of the...
0 votes
7
Which of the following suffices to convert an arbitrary CFG to an LL(1) grammar?Removing left recursion aloneFactoring the grammar aloneRemoving left recursion and factor...
30 votes
8
What is the minimum size of ROM required to store the complete truth table of an $8-bit \times 8-bit$ multiplier?$32 K \times 16$ bits$64 K \times 16$ bits$16 K \times 32...
6 votes
9
Consider the syntax directed definition shown below.$$\begin{array}{ll}S \rightarrow \mathbf{ id :=} E&\qquad \{gen(\mathbf{ id}.place = E.place;);\}\\E \rightarrow E_1 +...
56 votes
11
1 votes
12
Assume that the operators $+, -, \times$ are left associative and $^\hat{}$ is right associative. The order of precedence (from highest to lowest) is $ \ ^\hat{}, \times,...
30 votes
13
13 votes
21
Match the following items$$\begin{array}{ll|ll}\hline \text{(i)} & \text{Backus-Naur form} & \text{(a)} & \text{Regular expressions} \\\hline \text{(ii)} & \text{Lexical...
48 votes
24
Seven (distinct) car accidents occurred in a week. What is the probability that they all occurred on the same day?$\dfrac{1}{7^7}\\$$\dfrac{1}{7^6}\\$$\dfrac{1}{2^7}\\$$\...
36 votes
25
Four fair coins are tossed simultaneously. The probability that at least one head and one tail turn up is$\frac{1}{16}$$\frac{1}{8}$$\frac{7}{8}$$\frac{15}{16}$
22 votes
27
If a fair coin is tossed four times. What is the probability that two heads and two tails will result?$\frac{3}{8}$$\frac{1}{2}$$\frac{5}{8}$$\frac{3}{4}$