I would like to create a program where a user inputs their first and last name and the program say it to the user, but my program is only showing the first name.
Any help is greatly appreciated.
Code:#include <stdio.h> #include <string.h> int main() { char userfirst[] = ""; char userlast[] = ""; printf("Please enter in your first name and last name:\n"); scanf("%s,%s", userfirst, userlast); printf("Is your first and last name i%s?\n", strcat(userfirst, userlast)); getchar(); return 0; }