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:
-
copy first name from fn and place it into S2,
-
copy first letter of patients middle name from fn and place it into S3,
-
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
Get step-by-step solutions from verified subject matter experts
