Vidyalelo
Ruby Programming · Q26

Data Types and Variables in Ruby

Programming · Ruby Programming · question 26

Q26

Which of the following is the correct way to declare a variable in Ruby with a default value?

A.
var_name = value
Answer
B.
var_name := value
C.
var_name << value
D.
var_name => value

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board