ExamVeda
Login
Home
21
What is the result of the expression: !(true && false) in Ruby?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
22
What is the output of the given code?
counter = -50
while counter <0
  puts counter
  counter+=10
  end
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
23
What will be the output of the given code?
 boolean_1 = 2**3 != 3**2 || true
puts boolean_1
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
24
Which of the following is a valid boolean operator?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
25
Ruby does not support ++ operator, it only supports += operator.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
26
Assignment operator is also known as relational operator.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
27
The == 'is equal to' is known as relational operator.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
28
What is the output of the given code?
a = 5
b=10
while a <10 && b<20
  puts a+b
  a+=2
  b+=2
  end
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
29
What is the output of the given code?
 a = 5
b=10
while a <10 || b<20
  puts a*b
  a+=2
  b+=2
  end
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
30
The '=' is used for assigning value to variable?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board