ExamVeda
Login
Home
31
Which operator is used to take OR of two bitset variables?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
32
How many levels are there in exception safety?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
33
Which of the following is the correct way of declaring a tuple?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
34
To which type does the numeric limits are suitable?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
35
What will be the output of the following C++ code?
#include <iostream>
#include <fstream>
using namespace std;
int main () 
{
    int length;
    char * buffer;
    ifstream is;
    is.open ("sample.txt", ios :: binary );
    is.seekg (0, ios :: end);
    length = is.tellg();
    is.seekg (0, ios :: beg);
    buffer = new char [length];
    is.read (buffer, length);
    is.close();
    cout.write (buffer, length);
    delete[] buffer;
    return 0;
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
36
What will happen when we use void in argument passing?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
37
At which time does the static_cast can be applied?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
38
Which of the following library is used to do vector arithmetic?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
39
What will be the output of the following C++ code?
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main () 
{
    int myints[] = {10, 20, 30, 5, 15};
    vector<int> v(myints, myints + 5);
    make_heap (v.begin(), v.end());
    pop_heap (v.begin(), v.end()); v.pop_back();
    v.push_back(99); push_heap (v.begin(), v.end());
    sort_heap (v.begin(), v.end());
    for (unsigned i = 0; i < v.size(); i++)
        cout << ' ' << v[i];
    return 0;
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
40
What will be the output of the following C++ code?
#include <iostream>
using namespace std; 
int main()
{
    try
    {
        try
        {
            throw 20;
        }
        catch (int n)
        {
            cout << "Inner Catch\n";
            throw;
        }
    }
    catch (int x)
    {
        cout << "Outer Catch\n";
    }
    return 0;
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board