#include <iostream> #include <string> using namespace std; int main() { string firstName = "John"; string lastName = "Doe"; string fullName = firstName + " " + lastName; cout << fullName << "\n"; // John Doe return 0; }
Click Run to execute this code.