Vidyalelo
C++ Programming · Q852

C++ miscellaneous

Programming · C++ Programming · question 852

Q852

What will be the output of the following C++ code? #include #include #include using namespace std; int main() tuple tp1; tp1 = make_tuple(6, 'a', "Hello"); int x; string y; tie(x,ignore,y) = tp1; cout<<"x: "<<x<<" : "<<y<<endl; return 0;

A.
x: 6
y: Hello
Answer
B.
y: Hello
x: 6
C.
Error
D.
Segmentation fault

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board