Question: Write the following function: char * vstrcat ( const char * first , . . . ) ; All arguments of vstrcat are assumed to
Write the following function:
char vstrcatconst char first;
All arguments of vstrcat are assumed to be strings, except for the last argument, which
must be a null pointer cast to char type The function returns a pointer to a dynamically
allocated string containing the concatenation of the arguments, vstrcat should return a
null pointer if not enough memory is available. Hint: Have vstrcat go through the argu
ments twice: once to determine the amount of memory required for the returned string and
once to copy the arguments into the string.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
