51. What will be the output of the following C++ code?
#include <iostream>
#include <string>
#include <tuple>
using namespace std;
int main()
{
tuple <int, char, string> tp1;
tp1 = make_tuple(6, 'a', "Hello");
int x;
char y;
string z;
tie(x,y,z) = tp1;
cout<<"x: "<<x<<"\ny: "<<y<<"\nz: "<<z<<endl;
return 0;
}
#include <iostream>
#include <string>
#include <tuple>
using namespace std;
int main()
{
tuple <int, char, string> tp1;
tp1 = make_tuple(6, 'a', "Hello");
int x;
char y;
string z;
tie(x,y,z) = tp1;
cout<<"x: "<<x<<"\ny: "<<y<<"\nz: "<<z<<endl;
return 0;
}52. Which of the following operators are overloaded for functors?
53. What is mersenne_twister_engine?
54. Which operator is used to declare the destructor?
55. What will be the output of the following C++ code?
#include <iostream>
#include <string>
#include <tuple>
using namespace std;
int main()
{
tuple <int, char, string> tp;
tp = make_tuple(4, '1', "Hello");
return 0;
}
#include <iostream>
#include <string>
#include <tuple>
using namespace std;
int main()
{
tuple <int, char, string> tp;
tp = make_tuple(4, '1', "Hello");
return 0;
}56. Which operator is used to access the first or second element of a pair?
57. How the relationship is made in Association?
58. Which value is placed in the base class?
59. How many parameters are required for sort_heap function?
60. What are the Generators in C++?
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 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
