Question
#include <iostream>
#include <vector>
using namespace std;
int main ()
{
vector<int> first;
first.assign (7,100);
vector<int>::iterator it;
it=first.begin()+1;
int myints[] = {1776,7,4};
cout << int (first.size()) << '\n';
return 0;
}
a.
10
b.
9
c.
8
d.
7
Posted under Object Oriented Programming Using C++
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What is the output of this program?
Similar Questions
Discover Related MCQs
Q. Pick out the correct statement about vector.
View solution
Q. Which is optional in the declaration of vector?
View solution
Q. How many items are there in sequence container?
View solution
Q. Which of the following class template are based on arrays?
View solution
Q. Which of the following will return the new element at the end of container?
View solution
Q. How the list containers are implemented?
View solution
Q. Which of the following does not support any insertion or deletion?
View solution
Q. What do container adapter provide to interface?
View solution
Q. What does the sequence adaptor provide?
View solution
Q. Which are presented in the container adaptors?
View solution
Q. In which context does the stack operates?
View solution
Q. Which operator is used in priority queue?
View solution
Q. What do associate containers implement?
View solution
Q. By using which of the following the elements in the associate container can
View solution
Q. How many items are presented in the associate container?
View solution
Q. How many instance are allowed by map and set while inserting a element into container?
View solution
Q. What do maps and sets support?
View solution
Q. What kind of library is Standard Template Library?
View solution
Q. To what type of object does the container can be instantiated?
View solution
Q. What type of class template is list?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Object Oriented Programming Using C++? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!