Vidyalelo
C++ Programming · Q80

C++ miscellaneous

Programming · C++ Programming · question 80

Q80

What will be the output of the following C++ code? #include #include #include using namespace std; int main() tuple tp1; tuple tp2; tp1 = make_tuple(6, 'a', "Hello"); tp2 = make_tuple(9, 'z', "World"); cout (tp1) (tp1) (tp1) (tp2) (tp2) (tp2) (tp1) (tp1) (tp1) (tp2) (tp2) (tp2)<<")"<<endl; return 0;

A.
(6, a, Hello)
(9, z, World)
(9, z, World)
(6, a, Hello)
Answer
B.
(6, a, Hello)
(9, z, World)
(6, a, Hello)
(9, z, World)
C.
(9, z, World)
(6, a, Hello)
(9, z, World)
(6, a, Hello)
D.
(6, a, Hello)
(6, a, Hello)
(9, z, World)
(9, z, World)

Answer: Option A

Solution

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