Explore topic-wise MCQs in Testing Subject.

This section includes 657 Mcqs, each offering curated multiple-choice questions to sharpen your Testing Subject knowledge and support exam preparation. Choose a topic below to get started.

1.

Construct a binary tree using the following data.The preorder traversal of a binary tree is 1, 2, 5, 3, 4. The inorder traversal of the same binary tree is 2, 5, 1, 4, 3.

A. <a href="https://www.sanfoundry.com/wp-content/uploads/2017/08/binary-tree-operations-multiple-choice-questions-answers-mcqs-q15a.png"><img alt="Preorder traversal is 1, 2, 5, 3, 4 &amp; inorder traversal tree is 2, 5, 1, 4 - option a" class="alignnone size-full wp-image-250165" height="203" src="https://www.sanfoundry.com/wp-content/uploads/2017/08/binary-tree-operations-multiple-choice-questions-answers-mcqs-q15a.png" width="172"/></a>
B. <a href="https://www.sanfoundry.com/wp-content/uploads/2017/08/binary-tree-operations-multiple-choice-questions-answers-mcqs-q15b.png"><img alt="Preorder traversal is 1, 2, 5, 3, 4 &amp; inorder traversal tree is 2, 5, 1, 4 - option b" class="alignnone size-full wp-image-250166" height="204" src="https://www.sanfoundry.com/wp-content/uploads/2017/08/binary-tree-operations-multiple-choice-questions-answers-mcqs-q15b.png" width="166"/></a>
C. <a href="https://www.sanfoundry.com/wp-content/uploads/2017/08/binary-tree-operations-multiple-choice-questions-answers-mcqs-q15c.png"><img alt="Preorder traversal is 1, 2, 5, 3, 4 &amp; inorder traversal tree is 2, 5, 1, 4 - option c" class="alignnone size-full wp-image-250167" height="203" src="https://www.sanfoundry.com/wp-content/uploads/2017/08/binary-tree-operations-multiple-choice-questions-answers-mcqs-q15c.png" width="174"/></a>
D. <a href="https://www.sanfoundry.com/wp-content/uploads/2017/08/binary-tree-operations-multiple-choice-questions-answers-mcqs-q15d.png"><img alt="Preorder traversal is 1, 2, 5, 3, 4 &amp; inorder traversal tree is 2, 5, 1, 4 - option d" class="alignnone size-full wp-image-250168" height="200" src="https://www.sanfoundry.com/wp-content/uploads/2017/08/binary-tree-operations-multiple-choice-questions-answers-mcqs-q15d.png" width="171"/></a>
Answer» E.
2.

Which of the following properties are obeyed by all three tree traversals?

A. Left subtrees are visited before right subtrees
B. Right subtrees are visited before left subtrees
C. Root node is visited before left subtree
D. Root node is visited before right subtree
Answer» B. Right subtrees are visited before left subtrees
3.

How many orders of traversal are applicable to a binary tree (In General)?

A. 1
B. 4
C. 2
D. 3
Answer» E.
Previous Next