ExamVeda
Login
Home
41
What is the purpose of the 'std::forward_list' container in C++ STL?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
42
Which algorithm in C++ STL is used to sort a range of elements using quicksort?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
43
What is the purpose of the 'std::array' container in C++ STL?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
44
Which algorithm in C++ STL is used to compute the sum of elements in a range?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
45
What will be the output of the following C++ code?
#include <stdio.h>
#include <math.h>
int main ()
{
    printf ("%lf\n", fmod (5.3, 2) );
    printf ("%lf\n", fmod (18.5, 4.2) );
    return 0;
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
46
What will be the output of the following C++ code?
#include <typeinfo>
#include <iostream>
using namespace std;
class shape
{
    public:
    virtual void myvirtualfunc() const {}
};
class mytriangle: public shape
{
    public:
    virtual void myvirtualfunc() const
    {   
    };
};
int main()
{
    shape shape_instance;
    shape &ref_shape = shape_instance;
    try 
    {
        mytriangle &ref_mytriangle = dynamic_cast(ref_shape);
    }
    catch (bad_cast) 
    {
        cout << "Caught: bad_cast exception\n";
    }
    return 0;
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
47
Which is best for coding the standard library for c++?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
48
Where are standard exception classes grouped?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
49
What will be the output of the following C++ code?
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main () 
{
    vector<int> myvector;
    for (int i = 1; i < 6; ++i) 
        myvector.push_back(i);
    reverse(myvector.begin(), myvector.end());
    for (vector<int> :: iterator it = myvector.begin(); it != myvector.end(); ++it)
        cout << ' ' << *it;
    return 0;
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
50
How many parameters are used in frexp function?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board