Multiple choice

Decimal to binary conversion can be implemented using which of the following data structures?

  1. Stack

  2. Queue

  3. Array

  4. Both (1) and (3)

  5. None of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Decimal to binary conversion has the steps to divide the decimal number by 2 and get the binary form. This is stored in a stack. After completing this step, the binary format  pops out from the stack.