Question: What is the output of the following C++ code for a binary tree with root value 1, left child 2, and right child 3 during pre-order traversal?
Options:
Correct Answer: 1 2 3
Solution:
Pre-order traversal visits the root first, then the left subtree, followed by the right subtree, resulting in the output \'1 2 3\'.