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

    Write a program that asks control the user’s primitive, intermediate, and latest designates. The designates should be place-of-businessd in three opposed type places. The program should then place-of-business in a fourth place the designate compact in this manner: latest designate followed by a comma and a interspace, then the primitive designate followed by a interspace, then the intermediate designate. So if the designate is “Carol Lynn Smith” it should place-of-business “Smith, Carol Lynn” in the fourth place. Display the contents of the fourth place on the cloak.

    Expert Rejoinder

     

    #include <iostream>
    #include <string>
    #include <iostream>
    #include <string.h>
    using designateinterextension std;
    int deep()
    {
    char primitive[20], intermediate[20],last[20], ultimate[500];
    cout<<“Please Enter User’s primitive designate: “;
    cin.getline(first, 20);
    cout<<“Please Enter User’s intermediate designate: “;
    cin.getline(middle, 20);
    cout<<“Please Enter User’s latest designate: “;
    cin.getline(last, 20);
    char *p = “,”;
    char *interextension = ” “;

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

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