51. What should present when throwing a object?
52. Which is the correct syntax of defining a pure virtual function?
53. What does the cerr represent?
54. What is the use of reset function in bitset?
55. What is the use of random_shuffle() function of STL algorithm?
56. What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main ()
{
int n;
for (n = 5; n > 0; n--)
{
cout << n;
if (n == 3)
break;
}
return 0;
}
#include <iostream>
using namespace std;
int main ()
{
int n;
for (n = 5; n > 0; n--)
{
cout << n;
if (n == 3)
break;
}
return 0;
}57. What will be the output of the following C++ code?
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main ()
{
int myints[] = {2, 4, 6, 8, 10};
vector<int> v(myints, myints + 5);
make_heap (v.begin(),v.end());
cout << v.front() << '\n';
return 0;
}
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main ()
{
int myints[] = {2, 4, 6, 8, 10};
vector<int> v(myints, myints + 5);
make_heap (v.begin(),v.end());
cout << v.front() << '\n';
return 0;
}58. What is a comment in c++?
59. Which header is need to be used with function objects?
60. Pick the correct statement.
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 6
- C plus plus miscellaneous - Section 7
- C plus plus miscellaneous - Section 8
- C plus plus miscellaneous - Section 9
- C plus plus miscellaneous - Section 10
- C plus plus miscellaneous - Section 11
