Home / MCQ Bank / Computer
Computer Plus Plus Miscellaneous

What will be the output of the following C++ code? #include <iostream> #include <functional> #include <vector> #include <algorithm> #include <string> using namespace std; int main () { vector <string*> numbers; numbers.push_back ( new string ("one") ); numbers.push_back ( new string ("two") ); numbers.push_back ( new string ("three") ); vector <int> lengths ( numbers.size() ); transform (numbers.begin(), numbers.end(), lengths.begin(), mem_fun(&string :: length)); for (int i = 0; i < 3; i++) { cout << lengths[i]; } return 0; }

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

Related Computer Questions

SPSS stands for Which of the following statement prints hello\example\test.txt? LISP was developed by What is a chromatic number? What is the result of reversing a singly linked list?