Standard Library Design

1

What is the use of <exception> header

A. Contains the standard exception files
B. Contains the standard library files
C. It is used to arise an exception in the program
D. None of the mentioned

2

Pick out parameter for rehash method in unordered_set in c++?

A. count
B. size
C. hash
D. None of the mentioned

3

What is meant by standard c++ library?

A. It is the collection of class definitions for standard data structures and a collection of algorithms
B. It is a header file
C. Both a & b
D. None of the mentioned

4

Pick out the wrong header file.
a) <algorithm>
b) <containers>
c) <iterators>
d) <process>


5

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 << "test:";
17.
        for (i =  test.begin(); i != test.end(); ++i)
18.
            cout << " " << *i << endl;
19.
        cout << "test:";
20.
        for (i =  test2.begin(); i != test2.end(); ++i)
21.
            cout << " " << *i << endl;
22.
        cout << "test:";
23.
        for (i =  test3.begin(); i != test3.end(); ++i)
24.
            cout << " " << *i << endl;
25.
        cout << "test:";
26.
        for (i =  test4.begin(); i != test4.end(); ++i)
27.
            cout << " " << *i << endl;
28.
    }
A. test
B. test one
C. test two
D. None of the mentioned