Post order traversal of a given binary search tree T produce the following sequences of keys 10, 35, 24, 48, 50, 45, 60, 85,75, 55 Which of the following sequence is an in-order traversal of Tree T?
-
Solution
BST is
Which one of the following well formed formulae is tautology?
-
Solution
Since p → q = ¬ p v q, it is tautology.
Consider the following program :
main ( )
{
int i= 257;
int *iptr = & i;
printf(“%d %d”, * ((char*) iptr),* ((char*) iptr +1));
}
What should be the output of the above program?
-
Solution
The integer value 257 is stored in the memory as 0000000100000001. So, the individual bytes are taken by casting it to char* and get printed.
The postfix form of A ^ B * C – D + E/F/(G + H) is
-
Solution
A ^ B * C - DE/F/GH
A ^ B * C - D + E/F/(G + H)
AB ^ * C - D + E/F/GH + (^ has highest precedence)
AB ^ C * - D + E/F/GH +
AB ^ C * - D + E/F/GH +/
AB ^ C * - D - EF/GH +/
AB ^ C * D - EF/GH +/
AB ^ C * D - EF/GH +/+
What value would the following function return for the input x = 95?
Function fun (x : integer) : integer;
begin
if x> 100 then fun: = x – 10
else fun: =fun (fun (x + 11))
end:
-
Solution
fun = fun (fun (106))
= fun (96)
= fun (fun (107))
= fun (97)
= fun (fun (108))
= fun (98)
= fun (fun (109))
= fun (99)
= fun (fun (110))
= fun (100)
= fun (fun (111))
= fun (101)
= 91
The minimum size of ROM required to complete truth table of an 8-bit multiplexer is
-
Solution
Input to ROM = 2 lines, & bit each.
→ Passiable combinations in ROM = (2 ^ 8) *(2 ^ 8)
→ Size of truth table = 216 = 64 kB
The value of a float type variable is represented using the single-precision 32-bit floating point format of IEEE-754 standard that uses 1 bit for sign, 8 bits for biased exponent and 23 bits for mantissa. Afloat type variable X is assigned the decimal value of – 14.25. The representation of X in hexadecimal notation is
-
Solution
Simplify using K-Map and represent result in SOP form.Y = f(A,B,C,D) = Σ(0,1,2,6,7,10,14) + Σd(3,8,11,5) where ΣS represent don’t care condition.
-
Solution
Representing Y in Karnaugh Map
⇒ Y = f (A,B, C, D) = \(\overline{C}\overline{D}\) + A
Two computers that communicate with each other uses a simple parity check to detect errors for ASCII transmissions.Which of the following events will always lead to an undetected error?
-
Solution
If two bits or any even number of bits are inverted in byte during transmission, then this error cannot be detected by just only simple parity check to detect error.
Relation R is decomposed using a set of functional dependencies F, and relation S is decomposed using another set of functional dependencies G. One decomposition is definitely, BCNF, the other is definitely 3NF, but is not known to make a guaranteed identification,which of the following tests should be used on the decompositions?(Assume that closures of F and G are available)
-
Solution
If closures of F and G are available, then by using BCNF definition we can identify the decomposition.