Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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?

image text in transcribedimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Systems Analysis And Synthesis Bridging Computer Science And Information Technology

Authors: Barry Dwyer

1st Edition

0128054492, 9780128054499

More Books

Students also viewed these Databases questions