πŸ“Š Ruby
Q. Ruby is ?
  • (A) procedural language
  • (B) scripting language
  • (C) Markup language
  • (D) Stylesheet language
πŸ’¬ Discuss
βœ… Correct Answer: (B) scripting language

Explanation: Ruby is a scripting language

πŸ“Š Ruby
Q. Ruby is designed by?
  • (A) Yukihiro Matsumoto
  • (B) Guido van Rossum
  • (C) Tim Berners-Lee
  • (D) Brendan Eich
πŸ’¬ Discuss
βœ… Correct Answer: (A) Yukihiro Matsumoto

Explanation: Ruby is a scripting language designed by Yukihiro Matsumoto, also known as Matz.

πŸ“Š Ruby
Q. On which platform ruby runs ?
  • (A) Windows
  • (B) Mac OS
  • (C) Unix
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above

Explanation: Ruby runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX.

πŸ“Š Ruby
Q. Ruby was created in?
  • (A) 1992
  • (B) 1993
  • (C) 1994
  • (D) 1995
πŸ’¬ Discuss
βœ… Correct Answer: (B) 1993

Explanation: Ruby was created in 1993 by Yukihiro Matsumoto of Japan

πŸ“Š Ruby
Q. Ruby was written in?
  • (A) C
  • (B) C++
  • (C) Java
  • (D) Objective C
πŸ’¬ Discuss
βœ… Correct Answer: (A) C

Explanation: Ruby was written in C language.

πŸ“Š Ruby
Q. Which of the following statement is not a feature of ruby?
  • (A) Ruby is interpreted programming language.
  • (B) Ruby can be used to write Common Gateway Interface (CGI) scripts.
  • (C) Ruby can be embedded into Hypertext Markup Language (HTML).
  • (D) Ruby can not be connected to Database.
πŸ’¬ Discuss
βœ… Correct Answer: (D) Ruby can not be connected to Database.

Explanation: Ruby can not be connected to Database is not a feature of ruby.

πŸ“Š Ruby
Q. Which will be output for the following code?
Code:
puts "Hello, Ruby!";
  • (A) Hello, Ruby
  • (B) Hello Ruby!
  • (C) Hello, Ruby!
  • (D) Hello Ruby
πŸ’¬ Discuss
βœ… Correct Answer: (C) Hello, Ruby!

Explanation: This will produce the following result : Hello, Ruby!

πŸ“Š Ruby
Q. When Whitespace characters such as spaces and tabs can not ignored in Ruby code?
  • (A) While using strings
  • (B) While using integer
  • (C) while using float value
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (A) While using strings

Explanation: Whitespace characters such as spaces and tabs are generally ignored in Ruby code, except when they appear in strings.

πŸ“Š Ruby
Q. Which of the following is not a Reserved Words in Ruby?
  • (A) begin
  • (B) ensure
  • (C) retry
  • (D) pass
πŸ’¬ Discuss
βœ… Correct Answer: (D) pass

Explanation: pass is not a Reserved Words in Ruby.

πŸ“Š Ruby
Q. Reserved word can not be used as?
  • (A) constant
  • (B) variable names
  • (C) Both A and B
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (C) Both A and B

Explanation: reserved words may not be used as constant or variable names.