CS301P Quiz with Solved Answers by askmunir

CS301P Quiz with Solved Answers by askmunir

1. Which type of linked list has two Null pointers?

   - Answer: Doubly linked list


2. When an operator is found in the stack while evaluating a postfix expression, which of the following operation is performed on previous two operands?

   - Answer: pop


3. Which of the following statement declares an array ‘x’ with 6 integers?

   - Answer: int x[6];


4. A new node is added at the __________ of queue.

   - Answer: Rear


5. Which of the following is used to navigate from one node to another node in the linked list?

   - Answer: Next part of node









6. In C++, same code can be re-used for different data types by writing _____________.

   - Answer: templates


7. Which of the following is true about binary trees?

   - Answer: A binary tree should have only one root node


8. What is the output of the following program?

   ```cpp

   int main() {

       int array[5] = {10, 20, 30, 40, 50};

       cout << array[3];

       return 0;

   }

   ```

   - Answer: 40


9. Which of the following is an infix expression?

   - Answer: 2 + 3 * (1 + 2) * (3 + 4)


10. The result of the postfix expression 632*+ is ________________.

    - Answer: 12