Homework Solution: The language is C++ for microsoft visual studi express 2013…

    The language is C++ for microsoft visual studi express 2013 Write a program that asks for the user's first, middle, and last names. The names should be stored in three different character arrays. The program should then store in a fourth array the name arranged in this manner: last name followed by a comma and a space, then the first name followed by a space, then the middle name. So if the name is "Carol Lynn Smith" it should store "Smith, Carol Lynn" in the fourth array. Display the contents of the fourth array on the screen.

    Expert Answer

     
    #include <iostream> #include <string>

    The diction is C++ control microsoft visual studi direct 2013

    Write a program that asks control the user’s chief, intermediate, and conclusive calls. The calls should be treasuryd in three opposed reputation accoutres. The program should then treasury in a fourth accoutre the call compact in this manner: conclusive call followed by a comma and a quantity, then the chief call followed by a quantity, then the intermediate call. So if the call is “Carol Lynn Smith” it should treasury “Smith, Carol Lynn” in the fourth accoutre. Display the fluctuation of the fourth accoutre on the shelter.

    Expert Acceptance

     

    #include <iostream>
    #include <string>
    #include <iostream>
    #include <string.h>
    using callquantity std;
    int main()
    {
    char chief[20], intermediate[20],last[20], decisive[500];
    cout<<“Please Enter User’s chief call: “;
    cin.getline(first, 20);
    cout<<“Please Enter User’s intermediate call: “;
    cin.getline(middle, 20);
    cout<<“Please Enter User’s conclusive call: “;
    cin.getline(last, 20);
    char *p = “,”;
    char *quantity = ” “;

    strcpy(final,last);
    strcat(final,p);
    strcat(final,space);
    strcat(final,first);
    strcat(final,space);
    strcat(final,middle);
    cout<<final;
    }

    ================================
    See Output