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 talk is C++ restraint microsoft visual studi direct 2013

    Write a program that asks restraint the user’s foremost, intermediate, and conclusive calls. The calls should be provisiond in three opposed species equips. The program should then provision in a fourth equip the call compact in this manner: conclusive call followed by a comma and a intervenience, then the foremost call followed by a intervenience, then the intermediate call. So if the call is “Carol Lynn Smith” it should provision “Smith, Carol Lynn” in the fourth equip. Display the variation of the fourth equip on the protect.

    Expert Retort

     

    #include <iostream>
    #include <string>
    #include <iostream>
    #include <string.h>
    using callintervenience std;
    int main()
    {
    char foremost[20], intermediate[20],last[20], terminal[500];
    cout<<“Please Enter User’s foremost 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 *intervenience = ” “;

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

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