V
Q. What will be the output of the given code?
num=4>>2 puts num
left operands value is moved right by the number of bits specified by the right operand.So the answer is 1.
You must be Logged in to update hint/solution
Q. What is the correct way to declare a variable in Ruby?
Q. What is the output of the following code snippet? x = 10 unless x > 15 puts "Hello" end
Q. What is the difference between += and = operators?
Q. What does the term "monkey patching" refer to in Ruby?
Q. What does the each_slice method do in Ruby enumerators?
Q. What is the difference between =~ and == operators?
Discusssion
Login to discuss.