Sail E0 Webinar
Question


What is the output of this program?


1.
#include
2.
#include
3.
#include
4.
using namespace std ;
5.
typedef list LISTSTR;
6.
int main()
7.
{
8.
LISTSTR :: iterator i;
9.
LISTSTR test;
10.
test.insert(test.end(), "one");
11.
test.insert(test.end(), "two");
12.
LISTSTR test2(test);
13.
LISTSTR test3(3, "three");
14.
LISTSTR test4(++test3.begin(),
15.
test3.end());
16.
cout
Options:
A .  test
B .  test one
C .  test two
D .  None of the mentioned
Answer: Option D

In this program, We used the list to manipulate the given value.
Output:
$ g++ std3.cpp
$ a.out
test: one
two
test: one
two
test: three
three
three
test: three
three



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers