String | Data Structure Quiz for Beginners | Question 6

Last Updated :
Discuss
Comments

What will the output of the following questions:

C++
#include <bits/stdc++.h>
using namespace std;

int main()
{

    string a = "Hello";
    string b = "World";
    string c = b.append(a);
    cout << c << endl;

    return 0;
}

Hello world

World hello

WorldHello

Error

Share your thoughts in the comments