ExamVeda
Login
Home
21
What is the use of the set() function in bitset?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
22
What is the use of the allocator interface in the user-defined container?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
23
What are unary functors?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
24
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
class sample
{
    public:
    virtual void example() = 0; 
};
class Ex1:public sample
{
    public:
    void example()
    {
        cout << "ubuntu";
    }
};
class Ex2:public sample
{
    public:
    void example()
    {
        cout << " is awesome";
    }
};
int main()
{
    sample* arra[2];
    Ex1 e1;
    Ex2 e2;
    arra[0]=&e1;
    arra[1]=&e2;
    arra[0]->example();
    arra[1]->example();
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
25
How many Pseudo-random number engines are there?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
26
What will be the output of the following C++ code?
#include <iostream>
#include <string>
#include <cstdlib>
using namespace std;
template<class T>
class A
{
    public:
	T func(T a, T b){
		return a/b;
	}	
};
 
int main(int argc, char const *argv[])
{
	A <char>a1;
	cout<<a1.func(65,1)<<endl;
	cout<<a1.func(65.28,1.1)<<endl;
	return 0;
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
27
What is the user-defined header file extension in c++?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
28
What will be the output of the following C++ code?
#include <iostream>
#include <array>
using namespace std;
int main(int argc, char const *argv[])
{
	array<int,5> arr = {1,2,3,4,5};
	cout<<"Printing Using [] operator: ";
	for(int i=0;i<5;i++){
		cout<<arr[i]<<" ";
	}
	cout<<endl;
	cout<<"Printing Using at() function: ";
	for(int i=0;i<5;i++){
		cout<<arr.at(i)<<" ";
	}
	cout<<endl;
	return 0;
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
29
Unordered map is implemented using . . . . . . . .
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
30
How the template class is different from the normal class?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board