I'm trying to create an array that will allow the user to input the first name and last name and then display the last name first. I wasn't able to find a similar question.
here is what I have so far...
#include <iostream>
using namespace std;
int main()
{
char fname[25];
char lname[35];
cout << "Enter your First Name" << endl;
cin >> fname;
cout << "Your first name is " << fname <<endl;
cout << "Enter your last name" <<endl;
cin >> lname;
cout << "Your last name is " << lname << endl;
cout << "Most directories would list your name as " << lname, fname << endl;