What would be the solution to the given prefix notation?
/ / / 16 4 2 1
a) 1
b) 4
c) 2
d) 8
Answer: c
Explanation: The infix notation to the given prefix notation is 16/4/2/1 which gives us 1 as our answer. The infix notation is got from the prefix notation by traversing the equation from the right.
= 16/4/2/1
= 4/2/1 (16/4=4)
= 2/1 (4/2=2)
= 2 (2/1=2).
Related Posts
Which one of the following operations returns the first occurrence of bit 1 in bit arrays?
Bit fields and Bit arrays are same.
What does Hamming weight/population count mean in Bit arrays?
Run-Length encoding is used to compress data in bit arrays.
Which of the following bitwise operator will you use to invert all the bits in a bit array?
Which class in Java can be used to represent bit array?
Which of the following is/are not applications of bit arrays?
Join The Discussion