Question 2
void swap (int a, int b)
{
int temp;
temp = a;
a = b;
b = temp;
}
Question 3
A single array A[1..MAXSIZE] is used to implement two stacks. The two stacks grow from opposite ends of the array. Variables top1 and top2 (topl< top 2) point to the location of the topmost element in each of the stacks. If the space is to be used efficiently, the condition for “stack full” is
Question 4
Question 5
Question 6
Level order traversal of a rooted tree can be done by starting from the root and performing
Question 7
1. 9679, 1989, 4199 hash to the same value 2. 1471, 6171 hash to the same value 3. All elements hash to the same value 4. Each element hashes to a different value
Question 8
1. P → Q R 2. P → Q s R 3. P → ε 4. P → Q t R r
Question 9
Question 10
Consider the grammar rule E → E1 - E2 for arithmetic expressions. The code generated is targeted to a CPU having a single user register. The subtraction operation requires the first operand to be in the register. If E1 and E2 do not have any common sub expression, in order to get the shortest possible code
There are 90 questions to complete.