0

Data Structure Quiz 15

Description: To improve Knowledge in the field of Data Structures and its basic concepts
Number of Questions: 25
Created by:
Tags: Introduction to Data Structures Data Structures using C Stacks Queue Tower of Hanoi Trees Hashing Data Structures
Attempted 0/25 Correct 0 Score 0

Consider a minimum spanning tree T in a graph G. If the weight of an edge e of T is decreased, then the resulting tree T is still a minimum spanning tree.

  1. Yes

  2. No

  3. Sometimes yes sometimes no

  4. Cannot comment


Correct Option: A

If the keys '1, 2, 3, 4 and 5' are inserted in order into initially empty a AVL tree, the root node is

  1. 2

  2. 3

  3. 4

  4. 5


Correct Option: A

If all the edges in a graph are unique, then there is only one minimum spanning tree for the graph.

  1. Yes

  2. No

  3. Sometimes Yes, sometimes No

  4. Cannot comment


Correct Option: A

If the keys '1, 2, 3, 4 and 5' are inserted in order into initially empty a AVL tree, the height of the tree is

  1. 2

  2. 3

  3. 1

  4. 4


Correct Option: A

Consider the infix expression ((a + b * c))* d + e * (f + g). If the expression tree is drawn, then the height of the tree, is

  1. 2

  2. 3

  3. 4

  4. 5


Correct Option: C

If the keys '1, 2, 3, 4 and 5' are inserted in order into initially empty a AVL tree, the total number of rotations required to balance the tree, is

  1. 1

  2. 2

  3. 3

  4. 4


Correct Option: B

Consider the data given below: Variable Address Contents p 2568 425 q 4284 2568 r 6242 4284 What is the value of &p?

  1. 425

  2. 2568

  3. 4284

  4. None of these


Correct Option: B

Consider the infix expression ((a + b * c))* d + e * (f + g) If expression tree is drawn, how many nodes are there in the left subtree of root?

  1. 5

  2. 6

  3. 7

  4. 8


Correct Option: C

The cost of every edge in a complete graph G = (V,E) is 2. What is the cost of a spanning tree of the graph?

  1. 2 1/2V1/2

  2. 2 1/2E1/2

  3. 2(1/2V1/2 - 1)

  4. 2(1/2E1/2 - 1)


Correct Option: C

Consider the infix expression ((a + b * c))* d + e * (f + g). If the expression tree is drawn, how many nodes are there at the maximum depth?

  1. 2

  2. 3

  3. 4

  4. 5


Correct Option: A

Consider the data given below: Variable Address Contents p 2568 425 q 4284 2568 r 6242 4284 What is the value of **r?

  1. 6242

  2. 4284

  3. 2568

  4. None these


Correct Option: C

Find the address of the element A[3, 8] in the column major order array A[2:7, 4:9] with the base address 1 and each element occupies 4 bytes of memory.

  1. 1028

  2. 1040

  3. 1112

  4. None of these


Correct Option: C

Consider the infix expression ((a + b * c))* d + e * (f + g). If the expression tree is drawn, how many nodes are there in the right subtree of root?

  1. 5

  2. 6

  3. 7

  4. 8


Correct Option: A

void main() { int arr[4] = {1, 2,3, 4} int *ptr = &arr[0], i; for(i = 0; i < 2; i++) } What should be the statement in the blank to print all the elements in the array?

  1. printf(”%d “, *(ptr + i ));

  2. printf(”%d “, *(ptr)+ i );

  3. printf(”%d “, (ptr + i ));

  4. printf(”%d “, *(ptr ));


Correct Option: A

Consider the data given below: Variable Address Contents p 2568 425 q 4284 2568 r 6242 4284 What is the value of *q?

  1. 4284

  2. 2568

  3. 6242

  4. None these


Correct Option: B

The memory for S is allocated at

  1. compile time

  2. run time

  3. execution time

  4. none of these


Correct Option: A

What is the value of the expression '1 2 3 + * 3 2 1 - + *'?

  1. 0

  2. 20

  3. 10

  4. None of these


Correct Option: B

Consider the data given below: Variable Address Contents p 2568 425 q 4284 2568 r 6242 4284 What is the value of *(&q)?

  1. 6242

  2. 4284

  3. 2568

  4. None these


Correct Option: C

Which of the following is not a valid color of node of graph traversal?

  1. Black

  2. Grey

  3. Red

  4. White


Correct Option: C

Given an structure declaration Struct student { char first_name[10]; char mid_initital; char last_name[10]; int age; }; student S; The declaration of S allocates ________ bytes of memory.

  1. 5

  2. 23

  3. 32

  4. none of these


Correct Option: B

To accept the first_name, which of the following is the appropriate method?

  1. scanf(“%c”,S.first_name[10]);

  2. scanf(“%s”,S.first_name[10]);

  3. scanf(“%s”,S.first_name);

  4. scanf(“%s”,S->first_name);


Correct Option: C

Which of the following data structures can be termed as push down list?

  1. Array

  2. Stack

  3. Queue

  4. Tree


Correct Option: B

Find the odd one out.

  1. Ascending priority queue - Min Heap

  2. Descending priority queue - Max Heap

  3. Binary Search Tree - Sorting

  4. B-Tree - Index Sequential Search


Correct Option: C

Consider the data given below: Variable Address Contents p 2568 425 q 4284 2568 r 6242 4284 What is the value of &(*r)?

  1. 4284

  2. 2568

  3. 6242

  4. none these


Correct Option: C

If A, B, C, ___, Z represent operands and +, -, *, / ­represent operators, which of the following does not represent a valid expression?

  1. A B - C + D E F - + ­

    • + A - * ­ B C D / + E F * G H I
    • - ­ A B C * D * * E F G
  2. A B C D E - + ­ * E F *


Correct Option: D
- Hide questions