Expression Tree Multiple choice Questions and Answers (MCQs)

 

 Buy/Download all MCQ Ebook   >>>Click Here<<<

Expression Tree Multiple choice Questions and Answers (MCQs)

Click on any option to know the CORRECT ANSWERS

Question 1
The leaves of an expression tree always contain?
A
operators
B
operands
C
null
D
expression
Puzzles Questions answers

Question 1 Explanation: 
The leaves of an expression tree always contain the result of a given expression (i.e.) operands.

Question 2
A node can have a minimum of one child.
A
true
B
false
Bank exam Questions answers

Question 2 Explanation: 
It is possible for a node to have at least one child, as is the case with the unary minus operator.

Question 3
What does the other nodes of an expression tree(except leaves) contain?
A
only operands
B
only operators
C
both operands and operators
D
expression
English literature Questions answers

Question 3 Explanation: 
The nodes other than leaves always contain only operators. There cannot be any operand in those nodes.

Question 4
An expression tree is a kind of?
A
Binary search tree
B
Fibonacci tree
C
Binary tree
D
Treap
History Questions answers

Question 4 Explanation: 
The expression tree is a binary tree and not a binary search tree because it can have more than two children.

Question 5
The expression obtained by recursively producing a left expression, followed by an operator, followed by recursively producing a right expression is called?
A
prefix expression
B
infix expression
C
postfix expression
D
paranthesized expression
Reasoning Questions answers

Question 5 Explanation: 
It is an infix expression because the format of an infix expression is given by operand-operator-operand.

There are 5 questions to complete.

 

 Buy/Download all MCQ Ebook >>>CLICK HERE<<<