Space between 2+5 or 2 + 5 is valid but =begin and = begin is not valid.
True
False
8 practice sets · Page 1 of 1
Space between 2+5 or 2 + 5 is valid but =begin and = begin is not valid.
True
False
Why do we use =begin and =end?
To mark the start and end of multiline comment
To comment multiple lines
To avoid the use of # again and again
All of the mentioned
What is the output of the given code "Ruby".length #to find the length of given string
4 to find the length of given string
4
To find the length of given string
Ruby
This the right way to comment a single line. "Ruby".length # I'm a single line comment!
True
False
How to comment a single line?
Using #
Using begin and end
Using //
None of the mentioned
How to comment multiple lines in ruby?
Using multiline comments
Using single line comments
No option to comment
All of the mentioned
Which of the following type of comments are valid in ruby?
Single line comments
Multi line comments
Double line comments
All of the mentioned
Why do we use comments?
For later use to understand the working of the program
It is an efficient way of programming
It makes easy for the third person to understand
All of the mentioned