11. Which of the following is the correct way to start a single-line comment in Ruby?
12. In Ruby, what is the keyword used to define a class?
13. Which of the following is the correct way to define a constant in Ruby?
14. What is the default file extension for Ruby files?
15. Which method is used to convert a string to uppercase in Ruby?
16. What is the correct way to declare a variable in Ruby?
17. What is the correct syntax for printing a message to the console?
18. How do you add two numbers in Ruby?
19. Which of these operators is used for string concatenation?
20. What is the correct way to define a conditional statement in Ruby?
Read More Section(Basic Syntax in Ruby)
Each Section contains maximum 100 MCQs question on Basic Syntax in Ruby. To get more questions visit other sections.