ExamVeda
Login
Home
91
What is meant by hash tables in C++?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
92
What will be the output of the following C++ code?
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
bool IsOdd (int i)
{
    return ((i % 2) == 1);
}
int main () 
{
    vector<int> myvector;
    myvector.push_back(10);
    myvector.push_back(25);
    myvector.push_back(40);
    myvector.push_back(55);
    vector<int> :: iterator it = find_if (myvector.begin(), 
    myvector.end(), IsOdd);
    cout  << *it << '\n';
    return 0;
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
93
Given below classes which of the following are the possible row entries in vtable of Base class?
class Base
{
    public:
    virtual void function1() {};
    virtual void function2() {};
};
class D1: public Base
{
    public:
    virtual void function1() {};
};
class D2: public Base
{
    public:
    virtual void function2() {};
};
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
94
Which of the following is the correct syntax of declaring a complex number?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
95
What is the use of the flip function in bitset?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
96
What do input and output objects support?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
97
What is the use of log() function in a complex?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
98
What is meant by polymorphism?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
99
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
    double a = 10, b = 5, res;
    char Operator = '/';
    try 
    {
        if (b == 0)
            throw "Division by zero not allowed";
        res = a / b;
        cout << a << " / " << b << " = " << res;
    }
    catch(const char* Str)
    {
        cout << "\n Bad Operator: " << Str;
    }
    return 0;
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
100
What will be the output of the following C++ code?
#include <iostream>
#include <vector>
using namespace std;
int main ()
{
    vector<int> myvector (5);
    int* p = myvector.data();
    *p = 10;
    ++p;
    *p = 20;
    p[2] = 100;
    for (unsigned i = 0; i < myvector.size(); ++i)
        cout << ' ' << myvector[i];
    return 0;
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board