Question: Write a C function which receives 4 strings: fn, S2, S3 and S4. The first string fn holds a persons full name (first, middle and

Write a C function which receives 4 strings: fn, S2, S3 and S4. The first string fn holds a persons full name (first, middle and last separated by single space), while the other strings S2, S3 and S4 are empty.

The function should do the following:

  1. copy first name from fn and place it into S2,

  2. copy first letter of patients middle name from fn and place it into S3,

  3. Finally, copy last name from fn and place it into S4.

In your answer do not use any ready function except strlen(..) You have to write your own code. Part b) In main, use your function to print first and last names of each patient in question number 1.

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!