Assignment operator is also known as relational operator.
True
False
Browse topic-based Ruby practice sets.
96 practice sets · Page 4 of 5
Assignment operator is also known as relational operator.
True
False
The '=' is used for assigning value to variable?
True
False
The == 'is equal to' is known as relational operator.
True
False
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
A case statement compares the expression specified by case and that specified by when using the === operator and executes the code of the when clause that matches.
True
False
The expression specified by the when clause is evaluated as the left operand. If no when clauses match, case executes the code of the else clause.
True
False
Ruby can be used for developing internet and intranet applications.
True
False
It is must for Ruby to use a compiler.
True
False
Ruby can be embedded into Hypertext Markup Language(HTML).
True
False
Which of the following are valid floating point literal?
.5
2
0.5
None of the mentioned
What is the extension used for saving the ruby file?
.ruby extension
.rb extension
.rrb extension
None of the mentioned
Which of the following languages syntax matches with the Ruby's syntax?
Perl
PHP
Java
Jquery
Which of the following features does the 2.0 version of ruby supports?
Method keyword arguments
New literals
Security fixes
All of the mentioned