Home / MCQ Bank / Computer
Computer Basic Syntax In Ruby

What is the output of the given code? print "What's your first name?" first_name=gets.chomp a=first_name.capitalize a=a.reverse puts"My name is #{a}"

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option B • What's your first name? amil My name is Amil

Related Computer Questions

What will be output after executing following code? #include<stdio.h> # define a 10 void main() { printf("%d..", a); foo(); printf("%d", a); } void foo() { #undef a #define a 50 } What will be the output of the following C++ code? #include <iostream> using namespace std; template<class T = float, int i = 5> class A { public: A(); int value; }; template<> class A<> { public: A(); }; template<> class A<double, 10> { public: A(); }; template<class T, int i> A<T, i>::A() : value(i) { cout << value; } A<>::A() { cout << "default"; } A<double, 10>::A() { cout << "10" << endl; } int main() { A<int, 6> x; A<> y; A<double, 10> z; } How can you make the selected character super-scripted in Ms Word? How many recursive calls are there in Recursive matrix multiplication by Strassen's Method? What are command line arguments?