Q1. How do you implement the dynamic memory allocation in C? Give an appropriate illustration to describe your answer.
Q2. Illustrate that n log n ∗ 2 is the highest performance any sorting algorithm can accomplish.
Q3. A link list consists of 10 nodes and TOP is the pointer pointing to its first node. Reverse the list in such a manner that TOP now points to 10th node and 9th node is second, 8th is third and so forth and first becomes the tenth node.
Q4. Give the output of function call foo (5) when foo() is defined as:
int foo (int n)
{
if (n == 10) return n;
else return (n + foo(n+1));
}
What will occur when foo(11) is invoked?
Q5. Distinguish between Stack and Queue. How are they associated to LIFO and FIFO concept?
Q6. Define the structure for binary tree. Use this structure to symbolize the expression
3 + 5 * (7 – 9) – 6 + 9
in infix notation.
Q7. describe the boundary tag method with proper illustration.