Skip to content
VUBuddy

CS301 Quiz File 2023 by Danish Hanif

Data Structures PDF 415 KBUpdated 23 Oct 2026
Quiz CS301 Quiz File 2023 by Danish Hanif PDF 415 KB
vubuddy.com
Type
Quiz
Course
CS301 Data Structures
Size
PDF 415 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 415 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 pages 1, 2, 3 of 4. Download the file for all 4 pages.

Paid Services Available 10/10 Marks Guarantee · CS301 Quiz File · Jun 05, 2023 12:00 AM

Q1. A tree is an AVL tree if

  1. Any one node fulfills the AVL condition
  2. At least half of the nodes fulfill the AVL condition
  3. Root node fulfills the AVL condition
  4. All the nodes fulfill the AVL condition

Q2. When a function calling itself is called as __________.

  1. Inline
  2. Iteration
  3. Recursion
  4. Nested loop

Q3. What will be output of following code?

  1. 10
  2. 25
  3. Compile time error
  4. 15
  5. Level-order traversal for Binary Search Tree can be implemented, _______________.

Through both recursive method call and non-recursive method call

Only through recursive method

Through max-heap

Only through non-recursive method

Q5. What will be the output of following code?

  1. 14
  2. 15
  3. 16
  4. 17

Q6. Which one is the correct function call for the following function of calculating cube?

int cube(int& num) A. cube(num) B. cube(*num) C. cube(&num)

Q7. Consider an array int x[] = {14,15,4,9,7,18,3}. Which statement will be used to set first number of the list into the root node.

  1. root->setInfo( &x[1] )
  2. setInfo -> root( &x[0] );
  3. setInfo -> root( &x[1] );
  4. root->setInfo( &x[0] );

Q8. What will be output of the given C++ code?

char lhs[] = " Army";

char rhs[] = " Army";

cout<<strcmp(lhs,rhs);

A. Syntax error B. Positive number C. 0 D. Negative number

Q9. We allocate memory dynamically by using _______ operator.

  1. increment
  2. new
  3. decrement
  4. this

Q10. Following is a keyword of C++ ____________

  1. delete
  2. eliminate
All CS301 files →
CS301 Data Structures All CS301 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.