Write a program that prompts the user to input their first name from the keyboard and...

90.2K

Verified Solution

Question

Programming

Write a program that prompts the user to input their first namefrom the keyboard and stores them in the variable \"firstName\". Itdoes the same for last name and stores it in the variable\"lastName\". It then uses strcat to merge the two names, separatesthem by a space and stores the full name into a string variablecalled \"fullName\". In the end, the program must print out thestring stored within fullName. ANSWER IN C LANGUAGE!

You may use the following declarations for this problem:
char firstName [50];
char lastName [50];
char fullName [50];

You *must* use the function below to print out the fullname:
void printName(char fullName[])

Changing the function or its parameters is not permitted.

======================
Sample Output:
======================
Please enter your first name: John
Please enter your last name: Wick

Your full name is John Wick

Answer & Explanation Solved by verified expert
3.9 Ratings (672 Votes)
includevoid printNamechar fullNameprintfnFull Name    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students