31. What is meant by type_info?
32. What will be the output of the following C++ code?
#include <vector>
#include <algorithm>
#include <iostream>
using namespace std;
int main()
{
vector<int> v(10, 2);
if (all_of(v.cbegin(), v.cend(), [](int i){ return i % 2 == 0; }))
{
cout << "All numbers are even\n";
}
else
{
cout << "All numbers are not even\n";
}
return 0;
}
#include <vector>
#include <algorithm>
#include <iostream>
using namespace std;
int main()
{
vector<int> v(10, 2);
if (all_of(v.cbegin(), v.cend(), [](int i){ return i % 2 == 0; }))
{
cout << "All numbers are even\n";
}
else
{
cout << "All numbers are not even\n";
}
return 0;
}33. What will be the output of the following C++ code?
#include <iostream>
#include <limits>
using namespace std;
int main( )
{
cout << numeric_limits<float> :: min_exponent << endl;
}
#include <iostream>
#include <limits>
using namespace std;
int main( )
{
cout << numeric_limits<float> :: min_exponent << endl;
}34. What are Engine Adaptors?
35. Which is used to check the error in the block?
36. How many parameters does the throw expression can have?
37. Which of the following syntax is used to convert any variable to its original type?
38. What will be the output of the following C++ code?
#include <iostream>
#include <vector>
#include <forward_list>
using namespace std;
int main()
{
forward_list<int> fl1;
fl1.assign(5,10);
for (int&c : fl1)
cout << c << " ";
cout<<endl;
fl1.insert_after(fl1.begin(), {1,2,3});
for (int&c : fl1)
cout << c << " ";
cout<<endl;
return 0;
}
#include <iostream>
#include <vector>
#include <forward_list>
using namespace std;
int main()
{
forward_list<int> fl1;
fl1.assign(5,10);
for (int&c : fl1)
cout << c << " ";
cout<<endl;
fl1.insert_after(fl1.begin(), {1,2,3});
for (int&c : fl1)
cout << c << " ";
cout<<endl;
return 0;
}39. How the list containers are implemented?
40. How to protect the heap from affecting the memory?
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
