Question: Can anyone help me with this C exercise? Exercise 3 Write a program that meets these requirements Write a program that meets these requirements Prompt

Can anyone help me with this C exercise?

Can anyone help me with this C exercise? Exercise 3 Write aprogram that meets these requirements Write a program that meets these requirements

Exercise 3 Write a program that meets these requirements Write a program that meets these requirements Prompt the user to enter a person's first name and last name (on the same line) o o o o Use the fgets function to read in the names and store them in a single string The user may enter a name in FirstName LastName format. The user may also enter a name in LastName, FirstName format (note the comma) The entered name may be a mix of uppercase and lowercase characters Use string I/O functions and/or string library functions to extractthe names stored in the original string and put them in two, separate strings (one holds first name, the other holds last name) . o Hint: The existence of a comma in the original string determines the name format. o Hint: The sscanf function can be used to extract the names from the original string . Print out your fully processed first and last names . Print out the lengths of the first name string and the last name string . Check if the entered first name is "Sarah". Display a message with your comparison result. Create a new string that concatenates the first name string, the constant string Viking", and the last name string Display the concatenated string . Note If you get stuck, try to move on to other parts of the requirements. You can always come baclk later to work on it. Feel free to discuss possible approaches and algorithms for this problem with other students in the lab

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!