# Cpp Programming 18

IT Interview Exam Questions: Cpp Programming 18 (IT Interview Exam Question, IT Campus Placement)

Subject: Cpp Programming 18

Part 18: List for questions and answers of C ++ Language

Q1. Which of the following statements is false ?

a) Every tree is a bipartite graph

b) A tree contains a cycle

c) A tree with n nodes contains n-1 edges

d) A tree is a connected graph

Q2. Which of the following remarks about Tree- indexing are true?

a) It is an m-ary tree

b) Successful searches should terminate in leaf nodes

c) Unsuccessful searches may terminate in leaf nodes level of the tree structure

d) All of these

Q3. A binary tree in which if all its levels except possibly the last, have the maximum number of nodes and all the nodes at the last level appear as far left as possible, is called

a) Full binary tree

b) Binary Search Tree

d) Complete binary tree

Q4. A complete binary tree with the property that the value at each node is at least as large as the values at its children is called

a) binary search tree

b) Binary Tree

c) Completely balanced tree

d) Heap

Q5. A full binary tree with n leaves contains

a) n nodes

b) log2n nodes

c) 2n – 1 nodes

d) 2n+1 nodes

Q6. A 3-ary tree in which every internal node has exactly 3 children. The number of leaf nodes in such a tree with 6 internal nodes will be

a) 10

b) 09

c) 12

d) 13

Q7. A complete binary tree of level 5 has how many nodes ?

a) 15

b) 25

c) 63

d) 30

Q8. Traversing a binary tree first root and then left and right subtrees called _______traversal

a) postorder

b) preorder

c) inorder

d) none of these

Q9. A binary tree having n nodes and depth d will be about complete binary tree if

a) any node nd at level less than d-1 has two sons

b) it contains log(d)+1 nodes

c) for any node nd in the tree with a right descendent at level d lt must have a left son

d) all of these

Q10. Which of the following statements are correct ?

I. If each tree node contains a father field, then it’s not necessary to use either stack or threads

II. Traversal using father pointers is more time efficient than traversal of a threaded tree

III. A in-threaded binary tree is defined as binary tree that is both left-in threaded and rightin threaded

a) II and III

b) I and III

c) I and II

d) None of these

Q11. A binary tree of depth “d” is an almost complete binary tree if

a) each leaf in the tree is either at level

b) for any node

c) both a and b

d) None of these

Q12. If each node in a tree has value greater the every value in its left subtree and has value

less than every value in its right subtree, the tree is called

a) Complete tree

b) Full binary tree

c) Binary search tree

d) AVL tree

Q13. The number of nodes in a complete binary tree of level 5 is

a) 15

b) 20

c) 63

d) 71

Q14. The maximum number of nodes on level i of a binary tree is

a) 2i-1

b) 3i-1

c) i+1

d) 2i+2

Q15. The smallest number of key that will force a B-tree of order 3 to have a height 3 is

a) 12

b) 10

c) 7

d) None of these

Q16. A binary tree in which every non-leaf node has non-empty left and right subtrees is called a strictly binary tree. Such a tree with 10 leaves

a) Cannot have more than 19 nodes

b) Has exactly 19 nodes

c) Has exactly 17 nodes

d) Cannot have more than 19 nodes

Q17. Number of possible binary trees with 3 nodes is

a) 12

b) 9

c) 14

d) 5

Q18. A-2-3 tree is a tree such that

1. All internal nodes have either 2 or 3 children.

2. All paths from root to the leaves have the same length.

The number of internal nodes of a 2-3 tree having 9 leaves could be

a) 4

b) 5

c) 8

d) 7

Q19. The number of nodes in the left of the root respectively is

a) (4,7)

b) (7,4)

c) (6,3)

d) (3,6)

Q20. A full binary tree with n non-leaf nodes contains

a) logn nodes

b) n + 1 nodes

c) 2n-1 nodes

d) 2n + 1 nodes

Part 18: List for questions and answers of C ++ Language