?
What will be the output of the following C++ code?
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");
cout<<get<0>(tp)<<endl;
cout<<get<1>(tp)<<endl;
cout<<get<2>(tp)<<endl;
return 0;
}
#include <iostream>
#include <string>
#include <tuple>
using namespace std;
int main()
{
tuple <int, char, string> tp;
tp = make_tuple(4, '1', "Hello");
cout<<get<0>(tp)<<endl;
cout<<get<1>(tp)<<endl;
cout<<get<2>(tp)<<endl;
return 0;
}
Join the Discussion
Login to post a comment or share your explanation.
Login