ExamVeda
Login
Home
31
In Ruby, what is the purpose of the `redo` keyword?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
32
Which keyword in Ruby is used to exit a loop prematurely?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
33
In Ruby, which of the following is used to handle multiple conditions with one expression?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
34
In Ruby, what does the `else` keyword do?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
35
In Ruby, what does the `elsif` keyword do?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
36
The following syntax is correct for if conditional statement.
 if condition
    code
   end
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
37
If expression.
The expression can be of which type?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
38
What error does the if condition gives if not terminated with end statement?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
39
What is the output of the following?
if 1<2
   print "one is less than two"
   end
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
40
What is the output of the code?
 if 11<2
   print "Eleven is less than two"
   end
   print "11 is greater"
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board