Question
1.
#include
2.
#include
3.
using namespace std;
4.
int main ()
5.
{
6.
vector first;
7.
first.assign (7,100);
8.
vector::iterator it;
9.
it=first.begin()+1;
10.
int myints[] = {1776,7,4};
11.
cout
What is the output of this program?
1.
#include
2.
#include
3.
using namespace std;
4.
int main ()
5.
{
6.
vector first;
7.
first.assign (7,100);
8.
vector::iterator it;
9.
it=first.begin()+1;
10.
int myints[] = {1776,7,4};
11.
cout
Answer: Option D
Was this answer helpful ?
In this program, We are finding the size of the vector elements and resizing it.
Output:
$ g++ vect3.cpp
$ a.out
7
Was this answer helpful ?
More Questions on This Topic :
Question 4.
What do vectors represent?
....
Submit Solution