Q401
Open questionSelect an option to see the answer and solution.
Practice every MCQ with options. Use Show answers when you want the correct option and solution.
1,008
Questions
21/51
Page
Pick an option on a question to see the right answer and solution.
Q401
Open questionSelect an option to see the answer and solution.
Q402
Open questionSelect an option to see the answer and solution.
Q403
Open questionSelect an option to see the answer and solution.
Q404
Open question#include <iostream>
#include <string>
#include <cstdlib>
using namespace std;
template<class T, class U = char>
class A
{
T a;
U b;
public:
A(T a_val, char b_val = '$'){
this->a = a_val;
this->b = b_val;
}
void print(){
cout<<a<<' '<<b<<endl;
}
};
int main(int argc, char const *argv[])
{
A <int, int> a1(5,10);
A <int> a2(5);
A <float> a3(10.0);
return 0;
}Select an option to see the answer and solution.
Q405
Open questionSelect an option to see the answer and solution.
Q406
Open questionSelect an option to see the answer and solution.
Q407
Open question#include<iostream>
#include<any>
using namespace std;
int main()
{
float val = 5.5;
any var(val);
if(var.has_value())
{
cout<<"Var is not Empty\n";
}
else
{
cout<<"Var is Empty\n";
}
return 0;
}Select an option to see the answer and solution.
Q408
Open question#include<iostream>
using namespace std;
class Add
{
int x;
public:
Add(int x){
this->x = x;
}
int operator()(int a){
return x+a;
}
};
int main()
{
Add add_5(5);
int a = 5;
cout<<add_5(a);
return 0;
}Select an option to see the answer and solution.
Q409
Open questionSelect an option to see the answer and solution.
Q410
Open question#include <iostream>
using namespace std;
int main(void)
{
const char *one = "Test";
cout << one << endl;
const char *two = one;
cout << two << endl;
return 0;
}Select an option to see the answer and solution.
Q411
Open questionSelect an option to see the answer and solution.
Q412
Open questionSelect an option to see the answer and solution.
Q413
Open questionSelect an option to see the answer and solution.
Q414
Open questionSelect an option to see the answer and solution.
Q415
Open questionSelect an option to see the answer and solution.
Q416
Open questionSelect an option to see the answer and solution.
Q417
Open questionSelect an option to see the answer and solution.
Q418
Open questionSelect an option to see the answer and solution.
Q419
Open questionSelect an option to see the answer and solution.
Q420
Open questionSelect an option to see the answer and solution.