πŸ“Š Ruby
Q. Global variables in ruby begin with?
  • (A) @
  • (B) #
  • (C) $
  • (D) &
πŸ’¬ Discuss
βœ… Correct Answer: (C) $
πŸ“Š Ruby
Q. Default value of global variable is?
  • (A) -1
  • (B) Nil
  • (C) 1
  • (D) Infinite
πŸ’¬ Discuss
βœ… Correct Answer: (B) Nil
πŸ“Š Ruby
Q. Instance variables in ruby begin with?
  • (A) @
  • (B) #
  • (C) $
  • (D) &
πŸ’¬ Discuss
βœ… Correct Answer: (A) @
πŸ“Š Ruby
Q. Class variables in ruby begin with?
  • (A) @
  • (B) #
  • (C) double @
  • (D) ##
πŸ’¬ Discuss
βœ… Correct Answer: (C) double @
πŸ“Š Ruby
Q. Default value of class variables is?
  • (A) nil
  • (B) infinite
  • (C) -1
  • (D) error
πŸ’¬ Discuss
βœ… Correct Answer: (D) error
πŸ“Š Ruby
Q. Local variables in ruby begin with?
  • (A) @
  • (B) _
  • (C) *
  • (D) #
πŸ’¬ Discuss
βœ… Correct Answer: (B) _
πŸ“Š Ruby
Q. Constants in ruby begin with ?
  • (A) Lowercase
  • (B) @
  • (C) !
  • (D) Uppercase
πŸ’¬ Discuss
βœ… Correct Answer: (D) Uppercase
πŸ“Š Ruby
Q. Which of the following Ruby Pseudo-Variables is used for The receiver object of the current method?
  • (A) self
  • (B) current
  • (C) nil
  • (D) _FILE_
πŸ’¬ Discuss
βœ… Correct Answer: (A) self
πŸ“Š Ruby
Q. Which of the following Ruby Pseudo Variables is used to return the name of the current source file?
  • (A) _FILE_
  • (B) _CURRENT_
  • (C) _LINE_
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (A) _FILE_
πŸ“Š Ruby
Q. Which of the following Ruby Pseudo Variables is used to return current line number in the source file?
  • (A) _FILE_
  • (B) _CURRENT_
  • (C) _LINE_
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (C) _LINE_