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