11. Which operator is used to create the user-defined streams in c++?
12. What is the use of swap() function in array class?
13. Which operator is used to allocate the memory?
14. Which is used to describe the function using placeholder types?
15. What is the syntax of class template?
16. What is the correct statement about lambda expression?
17. In nested try-catch block, if the inner catch block gets executed, then . . . . . . . .
18. Which of the header file is used for array type manipulation?
19. What will be the output of the following C++ code?
#include <iostream>
#include <string>
using namespace std;
int main()
{
cout<<extent<remove_extent<string[10][20]>::type>::value;
cout<<extent<remove_extent<string[10][20][30]>::type>::value;
return 0;
}
#include <iostream>
#include <string>
using namespace std;
int main()
{
cout<<extent<remove_extent<string[10][20]>::type>::value;
cout<<extent<remove_extent<string[10][20][30]>::type>::value;
return 0;
}20. What will be the output of the following C++ code?
#include <iostream>
using namespace std;
class Test1
{
};
class Test2 : public Test1 { };
void Funct();
int main()
{
try
{
Funct();
}
catch (const Test1&)
{
cerr << "Caught a exception" << endl;
}
return 0;
}
void Funct()
{
throw Test2();
}
#include <iostream>
using namespace std;
class Test1
{
};
class Test2 : public Test1 { };
void Funct();
int main()
{
try
{
Funct();
}
catch (const Test1&)
{
cerr << "Caught a exception" << endl;
}
return 0;
}
void Funct()
{
throw Test2();
}Read More Section(C plus plus miscellaneous)
Each Section contains maximum 100 MCQs question on C plus plus miscellaneous. To get more questions visit other sections.
- C plus plus miscellaneous - Section 1
- C plus plus miscellaneous - Section 2
- C plus plus miscellaneous - Section 3
- C plus plus miscellaneous - Section 4
- C plus plus miscellaneous - Section 5
- C plus plus miscellaneous - Section 6
- C plus plus miscellaneous - Section 8
- C plus plus miscellaneous - Section 9
- C plus plus miscellaneous - Section 10
- C plus plus miscellaneous - Section 11
