- Type
- Quiz
- Course
- CS301P Data Structures (Practical)
- Size
- PDF 874 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 1, 2 of 2. Download the file for all 2 pages.
Q1. In stack, which node will be considered as the Top of stack?
Correct answer: Last node
Q2. Which of the following is used to navigate from one node to another node in the linked list?
Correct answer: Next part of node
Q3. Each operator in a postfix expression refers to the previous _______ operand(s).
Correct answer: 2
Q4. How many times a for loop will be executed if we use the find() method of list data structure to find the value 10 from the given list?
Correct answer: 10
Q5. Which of the following statement declares an array ‘x’ with 6 integers?
Correct answer: int x[6];
Q6. Consider a list {2,6,8,7,1} represented as a linked list. In this list “current” is a:
Correct answer: Head node
Q7. What does the following method do for a given linked list class? void traverse(List list) { Node* savedCurrentNode = list.currentNode; list.currentNode = list.headNode; for(int i = 1; list.next(); i++) {cout << "\n Element " << i << " " << list.get(); } list. currentNode = savedCurrentNode; }
Correct answer: Displaying the values of nodes
Q8. What value will be returned by the given function if the values of ‘a’ and ‘b’ are 6 and 5? int i_avg (int a, int
Q9. In a doubly linked list, we can traverse the list in _______________.
Correct answer: Both directions
Q10. In C++, a single stack can be used for different types by using __________.
Correct answer: Templates
Related CS301P files
All CS301P files →Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.