Skip to content
VUBuddy

CS301P Quiz 5

Data Structures (Practical) PDF 859 KBUpdated 23 Oct 2026
Quiz CS301P Quiz 5 PDF 859 KB
vubuddy.com
Type
Quiz
Course
CS301P Data Structures (Practical)
Size
PDF 859 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 859 KB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

Preview text

Text from page 1 of 1. Download the file for all 1 page.

CS301P - Quiz No.5

Date: 20 November 2025

Q1. In which traversal method left subtree is visited in first step?

  1. Preorder traversal
  2. In-order traversal
  3. Not possible to traverse left subtree
  4. level-order traversal

Correct answer: In-order traversal

Q2. Which of the following traversal method will be used, if we want the output as 3,4,7,9,14,15,16,18,20?

  1. Level-order traversal
  2. In-order traversal
  3. Post-order traversal
  4. Preorder traversal

Correct answer: In-order traversal

Q3. Which of the following condition will be true if a node is NULL during the in-order traversal using recursive calls?

  1. Node can contain only one child
  2. Node does not contain both left and right children
  3. Node contains only right child
  4. Node contains only left child

Correct answer: Node does not contain both left and right children

Q4. The code of BST traversal methods becomes very short by using:

  1. Friend functions
  2. Heap
  3. Recursive calls
  4. Non-recursive calls

Correct answer: Recursive calls

Q5. What does the following traversal code do? void func (TreeNode* treeNode) { if( treeNode != NULL ) { func(treeNode->getLeft()); func(treeNode->getRight()); cout << *(treeNode->getInfo())<<" "; } }

  1. Preorder traversal
  2. Post-order traversal
  3. Level-order traversal
  4. In-order traversal

Correct answer: Post-order traversal

VU TOOLKIT BY PARADOXCIAL

All CS301P files →
CS301P Data Structures (Practical) All CS301P handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.