MCQs
Total Questions : 10
Answer: Option D. -> All of the Mentioned
Ruby supports all the features because it is a object oriented programming language.
Answer: Option D. -> All of the mentioned
Easier way to comment multiple lines.
Answer: Option C. -> 0.5
floating point literals are valid only when they have digits on both the sides of decimal point.
Answer: Option B. -> 4
It finds the length of string.
Answer: Option A. -> It indicates that we are talking about a string
Quotation marks are used only with strings.
Answer: Option B. -> True
As 77 is less than 78 hence the boolean value will be printed as true.
Output:
True
Answer: Option D. -> Hey Everyone
Print prints whatever is given and puts in addition to printing it inserts a new blank line.
Answer: Option B. -> It modifies the value stored in the variable
It is used for modifying the variable.
Answer: Option B. -> #{expr}
#{expr} is valid.
Answer: Option C. -> undefined method
There is no predefined method named irreverse in ruby.
Output:
undefined method `irreverse' for "eric":String