Home / MCQ Bank / Computer
Computer Basic Syntax In Ruby

What does the 'puts' method do in Ruby?

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option A • Prints to console

Related Computer Questions

In R, what does the polygon() function do when used in a plot? In Oozie, what is the role of the "transition" element in a decision node? What will be the output of the following C++ code? #include <iostream> #include <algorithm> #include <vector> using namespace std; int main () { int myints[] = {10, 20, 30, 5, 15}; vector<int> v(myints, myints + 5); make_heap (v.begin(), v.end()); pop_heap (v.begin(), v.end()); v.pop_back(); cout << v.front() << '\n'; return 0; } What is the purpose of the extend keyword in Ruby? What will be the output of the following C++ code? #include <iostream> #include <string> using namespace std; class Box { int capacity; public: Box(int cap){ capacity = cap; } friend void show(); }; void Box::show() { Box b(10); cout<<"Value of capacity is: "<<b.capacity<<endl; } int main(int argc, char const *argv[]) { show(); return 0; }