Sail E0 Webinar
Question
What is the output of the given code?counter = 2while counter < 68  puts counter  counter**=2  end
Options:
A .  2 4 16 64
B .  2 4 16
C .  2 4 16 256
D .  None of the mentioned
Answer: Option B


The counter will increment by the power of two.
Output:
2
4
16



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers