The longest path from node x to the leaf node?11 Data Structure and Node js Mcq questions and Answers

Data structure:

1. Which data structure is used to convert the infix to prefix notation?

  1. Queue 
  2. Binary tree
  3. Stack 
  4. None

Answer: 3)Stack

Stack data Structure

Data structure:

2. The data elements of an array are stored at ...........
Location in the main memory?

  1. Non-contagious
  2. Non-communicable
  3. Contiguous 
  4. None

Answer: 3)Contiguous 

Array In Data structure

Node Js:

3. The Source code in Node.Js is executed by .....

  1. Node.Js interpreter
  2. C compiler 
  3. Js compiler 
  4. None 

Answer: 1)Node.Js interpreter

Node Js:

4. Which of the following is not a feature of Node.Js?

  1. Single-threaded 
  2. No buffering 
  3. Open-source
  4. Embedded system

Answer: 4)Embedded System

Features of node js

Node Js:

5. Node JS is a ....... runtime environment.

  1. Cross-platform 
  2. Dependent 
  3. Both A and B
  4. None

Answer: 1)Cross-platform

Java script:

6. What is the output of the following code?


  1. False
  2. True 
  3. Undefined 
  4. None

Answer: 1)False.

Java script:

7. what is the output of the following code?


  1. 22
  2. 2
  3. 4
  4. 2/2

Answer: 1)22

Data structure:

8. In array, Space complexity for the worst case is........

  1. O(n)
  2. O(1)
  3. O(log n)
  4. None

Answer: 1) O(n)

Data structure:

9. The collection of similar type of data item stored at Contiguous memory locations is called........

  1. Pointer
  2. Arrays
  3. Tree
  4. None

Answer: 3)Arrays

Data structure:

10. Int, char, float, can hold .......... value.

  1. Multiple values.
  2. Double value
  3. Single value
  4. None

 Answer: 3)Single value

Array and structure are commonly used for storing multiple values, these are called composite data types.

Data structure:

11. The longest path from node x to the leaf node.

  1. Depth of node x
  2. Height of node x
  3. Both 
  4. None

Answer: 2)height of node x

Data Structure:

12. The node of the tree, which doesn't have any child node, is called....... node?

  1. Leaf 
  2. Child
  3. Ancestor node
  4. None

Answer: 1)leaf node

Read more About Data Structure basics

Tree Terminology In Data Structure

Post a Comment