1. Which of the following is NOT a valid data type in Ruby? A. Integer B. Float C. Boolean D. Double Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
2. What is the data type of the value 3.14 in Ruby? A. Integer B. Float C. String D. Boolean Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
3. What is the default value of a variable in Ruby if not initialized? A. 0 B. nil C. "undefined" D. FALSE Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
4. Which symbol is used to declare a variable in Ruby? A. $ B. & C. @ D. # Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
5. What does the 'nil' value represent in Ruby? A. Empty string B. Null value C. Zero D. Undefined Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
6. Which of the following is a valid variable name in Ruby? A. 123variable B. _variable C. -variable D. variable! Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
7. What is the method used to convert a string to an integer in Ruby? A. .to_i B. .to_int C. .convert_int D. .parse_int Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
8. What is the method used to convert a string to a float in Ruby? A. .to_f B. .to_float C. .convert_float D. .parse_float Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
9. What is the data type of the value true in Ruby? A. Integer B. Float C. String D. Boolean Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
10. What is the method used to convert a value to string in Ruby? A. .to_s B. .to_string C. .convert_string D. .parse_string Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board