In range operator ... is used for ?
1.Creates a range from start point to end point inclusive.
2.Creates a range from start point to end point exclusive.
3.Creates a range from start point inclusive to end point exclusive.
4.Creates a range from start point exclusive to end point inclusive
Posted Date:-2022-08-22 07:47:14
single-quoted strings don`t allow ?
1.substitution
2.backslash notation
3.single-quoted strings allow substitution and backslash notation.
4.single-quoted strings don`t allow substitution and allow backslash notation.
Posted Date:-2022-08-22 06:58:18
When Whitespace characters such as spaces and tabs can not ignored in Ruby code?
1.While using strings
2.While using integer
3.while using float value
4. All of the above
Posted Date:-2022-08-22 06:01:23
Among the following which operator has highest Precedence?
1.::
2. .
3. []
4. **
Posted Date:-2022-08-22 08:32:16
Among the following which operator has lowest Precedence?
1. .
2.^
3....
4.>>
Posted Date:-2022-08-22 08:48:49
Class variables in ruby begin with?
1.@
2.#
3.double @
4.##
Posted Date:-2022-08-22 07:31:55
Constants in ruby begin with ?
1.Lowercase
2. !
3.!
4.Uppercase
Posted Date:-2022-08-22 07:34:23
Default value of class variables is?
1.nil
2.infinite
3.-1
4.error
Posted Date:-2022-08-22 07:33:27
Default value of global variable is?
1.-1
2.nil
3.1
4.infinite
Posted Date:-2022-08-22 06:07:23
eql? Operator is used for?
1.Used to test equality within a when clause of a case statement.
2. if the receiver and argument have both the same type and equal values.
3.if the receiver and argument have the same object id.
4. All of the above
Posted Date:-2022-08-22 07:44:43
equal? Operator is used for?
1.Used to test equality within a when clause of a case statement.
2. if the receiver and argument have both the same type and equal values.
3. if the receiver and argument have the same object id.
4. All of the above
Posted Date:-2022-08-22 08:41:34
Global variables in ruby begin with?
1.@
2.#
3.$
4.&
Posted Date:-2022-08-22 06:06:42
Guess the operator : If Condition is true ? Then value X : Otherwise value Y?
1.Range Operators
2.Ternary Operator
3.Parallel Operator
4.Arithmetic operator
Posted Date:-2022-08-22 08:42:44
Instance variables in ruby begin with?
1.@
2.#
3. $
4.&
Posted Date:-2022-08-22 07:29:02
Local variables in ruby begin with?
1. @ B. C.D.
2. _
3. *
4. #
Posted Date:-2022-08-22 06:08:11
Objects of which class does the integer from the range -2^60 to 2^(60-1) belong to?
1.Octal
2.Bignum
3.Fixnum
4.Binary
Posted Date:-2022-08-22 06:59:17
Reserved word can not be used as?
1.constant
2.variable names
3.Both A and B
4.None of the above
Posted Date:-2022-08-22 06:02:38
Ruby is ?
1.procedural language
2. scripting language
3.Markup language
4. Stylesheet language
Posted Date:-2022-08-22 05:56:07
Ruby is designed by?
1.Yukihiro Matsumoto
2.Guido van Rossum
3.Tim Berners-Lee
4.Brendan Eich
Posted Date:-2022-08-22 05:57:01
Ruby was created in?
1.1992
2.1993
3.1994
4.1995
Posted Date:-2022-08-22 05:57:54
What does end represent?
1.keyword represents the ending of loop
2.keyword represents the start of loop
3. keyword represents the start and ending of loop
4.keyword represents the infinite loop
Posted Date:-2022-08-22 09:14:59
What does the 1..5 indicate?
1.Exclusive range
2. Both inclusive and exclusive range
3.Inclusive range
4.None of the above
Posted Date:-2022-08-22 09:41:57
What is the output of the given code? my_string=Ruby puts(my_string)
1.Ruby
2.Nil
3.Error
4.my_string
Posted Date:-2022-08-22 07:38:30
What is the sequence of ruby strings?
1.16-bit bytes
2.8-bit bytes
3.4-bit bytes
4.None of the above
Posted Date:-2022-08-22 06:56:17
What is the use of break statement?
1.Terminates the most External loop.
2.Terminates all loop
3.Terminates the program
4. Terminates the most internal loop.
Posted Date:-2022-08-22 09:39:40
What is true about Until loop?
1.Executes code while conditional is true
2.In until loop increment is not required
3. Executes code while conditional is false
4.None of These
Posted Date:-2022-08-22 09:38:35
What is true about while loop?
1.Executes code while conditional is true
2. In while loop increment is not required
3. Executes code while conditional is false
4.None of the above
Posted Date:-2022-08-22 09:12:29
What will be the output of the given code? boolean_var = !(100 / 10 === 10) puts boolean_var
1.TRUE
2.FALSE
3.Type Error
4.Syntax Error
Posted Date:-2022-08-22 08:38:58
What will be the output of the given code? a=1 b=1 while a&&b puts a+b end
1.2
2.2 2 2 2 2
3.Infinite Loop
4.Syntax Error
Posted Date:-2022-08-22 09:37:27
What will be the output of the given code? boolean_var = !true || (true || 36 != 6**2) puts boolean_var
1.TRUE
2.FALSE
3.Error
4.None of the above
Posted Date:-2022-08-22 09:02:43
What will be the output of the given code? boolean_var = 15 < 16 && 15 < 15 puts boolean_var
1.TRUE
2.FALSE
3.Type Error
4.Syntax Error
Posted Date:-2022-08-22 08:33:40
What will be the output of the given code? boolean_var = 3**2 != 2**3 || true puts boolean_var
1.TRUE
2.FALSE
3.1
4.0
Posted Date:-2022-08-22 08:37:44
What will be the output of the given code? boolean_var = false || -20 > -18 puts boolean_var
1.TRUE
2.FALSE
3.Type Error
4.Syntax Error
Posted Date:-2022-08-22 09:01:38
What will be the output of the given code? counter = 1 while counter < 5 puts counter counter = counter + 1 end
1. Prints the number from 1 to 4
2.Prints the number from 1 to 5
3. Prints the number from 2 to 5
4.Prints the number from 2 to 4
Posted Date:-2022-08-22 09:46:38
What will be the output of the given code? counter = true while counter !=false puts counter end
1.TRUE
2.FALSE
3.Syntax Error
4.Infinite Loop
Posted Date:-2022-08-22 09:23:09
What will be the output of the given code? for i in 1...3 for j in 1..3 puts j end end
1.1 2 1 2
2. 0 1 2 0 1 2
3.1 2 3 1 2 3
4. 1 2 3 1 2
Posted Date:-2022-08-22 09:44:16
What will be the output of the given code? for i in 1..5 && j in 5..10 puts i+j end
1. 6 8 10 12 14 16
2.Syntax Error
3.6 8 10 12 14
4.Type Error
Posted Date:-2022-08-22 09:22:07
What will be the output of the given code? for num in 1...4 puts num*num end
1. 0 1 4 9.
2.1 4 9 16
3. 0 1 2 3
4.1 2 3
Posted Date:-2022-08-22 09:20:41
What will be the output of the given code? for num in 1...5 puts num end
1.1 2 3 4
2. 1 2 3 4 5
3.0 1 2 3 4
4.0 1 2 3 4 5
Posted Date:-2022-08-22 09:16:44
What will be the output of the given code? i = 4 while i > 0 do print i i -= 1 end
1.321
2.3210
3.4321
4.43210
Posted Date:-2022-08-22 09:48:32
What will be the output of the given code? i=1 for i in 6..10 puts i**2 end
1. 36 49 64 81
2.49 64 81 100
3. 49 64 81
4.36 49 64 81 100
Posted Date:-2022-08-22 09:45:17
What will be the output of the given code? num=(10<11)||(11===11)? (11===11.0): 0 puts num
1. TRUE
2.FALSE
3.1
4.0
Posted Date:-2022-08-22 09:00:45
What will be the output of the given code? num=4>>2 puts num
1. -2
2.0
3.2
4.1
Posted Date:-2022-08-22 08:35:34
What will be the output of the given code? while a&&b puts a end
1.TRUE
2.FALSE
3.Syntax Error
4.Name Error
Posted Date:-2022-08-22 09:47:47
What will be the output of the given code? num=4<<2 puts num
1.4
2.8
3.16
4.32
Posted Date:-2022-08-22 08:50:27
What will the following expression evaluate to? !true && !false
1.True
2.False
3.Syntax Error
4.None of These
Posted Date:-2022-08-22 09:04:54
What will the following expression evaluate to? true || false
1.TRUE
2.FALSE
3.Syntax Error
4.None of the above
Posted Date:-2022-08-22 08:39:52
Which character is used to give comment in ruby?
1.!
2.@
3.#
4. $
Posted Date:-2022-08-22 06:04:18
Which notation is used for Octal notation?
1.s
2.xnn
3.
4. n
Posted Date:-2022-08-22 06:53:17
Which of the following datatypes are valid in Ruby?
1.Numbers
2.String
3.Boolean
4. All of the above
Posted Date:-2022-08-22 06:54:11
Which of the following is Exit Controlled loop?
1.do..while
2.For
3.Until
4.While
Posted Date:-2022-08-22 09:43:15
Which of the following is not a type of Bitwise Operators?
1.<<
2.^
3.~
4.None of the above
Posted Date:-2022-08-22 07:45:54
Which of the following is not a type of loop in ruby?
1.For Loop
2.Foreach Loop
3.Until Loop
4.While Loop
Posted Date:-2022-08-22 09:11:16
Which of the following is not type of operator in ruby?
1.Arithmetic Operators
2.Comparison Operators
3.Similar operator
4.Parallel Assignment
Posted Date:-2022-08-22 07:43:40
Which of the following Ruby Pseudo Variables is used to return current line number in the source file?
1._FILE_
2._CURRENT_
3. _LINE_
4.None of the above
Posted Date:-2022-08-22 06:09:56
Which of the following Ruby Pseudo Variables is used to return the name of the current source file?
1._FILE_
2. _CURRENT_
3._LINE_
4.None of the above
Posted Date:-2022-08-22 07:35:51
Which of the following Ruby Pseudo-Variables is used for The receiver object of the current method?
1.self B. C. D.
2.current
3.nil
4. _FILE_
Posted Date:-2022-08-22 06:08:53
Which of the following statement is not a feature of ruby?
1.Ruby is interpreted programming language.
2.Ruby can be used to write Common Gateway Interface (CGI) scripts.
3.Ruby can be embedded into Hypertext Markup Language (HTML).
4.Ruby can not be connected to Database.
Posted Date:-2022-08-22 06:00:24
Which operator is used to check variable and method are defined or not?
1.define
2.define?
3.defined?
4.defined
Posted Date:-2022-08-22 08:45:34
Which operator is used to find exponent in ruby?
1. *
2.**
3.^
4.%
Posted Date:-2022-08-22 08:40:40
Which statement is used to Jumps to the next iteration of the most internal loop?
1.break
2. next C. D.
3.redo
4.retry
Posted Date:-2022-08-22 09:13:13
Which statement is used to restarts the invocation of the iterator call?
1.break
2.next
3.redo
4.retry
Posted Date:-2022-08-22 09:14:10
Which statement is used to Restarts this iteration of the most internal loop, without checking loop condition?
1.break
2.next
3.redo
4.retry
Posted Date:-2022-08-22 09:40:44
Which type of number(0b1011 ) is ?
1.Octa
2.Hexadecimal
3.Binary
4.Decimal
Posted Date:-2022-08-22 07:39:37
Why can not we use quotation marks ("or") with boolean?
1. It indicates that we are talking about a string
2.It indicates that we are assining a value
3.It indicates that that we are replacing boolean data type with string data type
4.None of the above
Posted Date:-2022-08-22 07:37:40
Why notation is used in Ruby?
1.Formfeed
2.Escape
3.Carriage return
4.Bell
Posted Date:-2022-08-22 07:36:42