MCQs
None.
count is used to return the new number of buckets.
It is the collection of class definitions for standard data structures. This part of the library was
derived from the Standard Template Library.
Answer: (d)
Explanation:None.
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
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
In this program, We used the queue to process the given input.
Output:
$ g++ std1.cpp
$ a.out
abc
Answer:c
Explanation:The standard header files for string is string and regex. So the wrong one presented
here is ios.
vector in the container library contains sequence container that manipulates and encapsulates
dynamic size arrays.
In this program, We used the vector to print the 42 for 10 times.
Output:
$ g++ std.cpp
$ a.out
42 42 42 42 42 42 42 42 42 42
None.