Question: Using C write a function, halfstring, which creates a new string which skips every second characters of the first string. For example: John Smith would
Using C write a function, halfstring, which creates a new string which skips every second characters of the first string.
For example: "John Smith" would become "Jh mt"
The function prototype must be:
void halfstring(const char [ ], char [ ]);
Think how you will use the two parameters.
As a result, you will have both the resulted string and the original one.
Do not use ANY system-defined string functions (i.e. those found in the string.h library including but not limited to strlen, strcat, and strcpy.).
Write driver code to test your function.
As we discussed in the class, your program and output must be self-explanatory.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
