Question: In C, implement function int qstr_cat(char *dst, char *src), that appends a copy of the string src to the dst string. The function should return
In C, implement function int qstr_cat(char *dst, char *src), that appends a copy of the string src to the dst string. The function should return the number of the characters in the final dst string. The function should copy characters only until the first ? character and after copying the destination string must also terminate with ?. (Hint: you can test that the destination string looks correct by using the qstr_print function) (Do not use string.h library)
For example, if the function gets the following strings as parameters:
char dst[50] = "Auto ajoi?"; char *src = " katua pitkin? lujaa";
it should return:
22
and the string dst should look like this:
Auto ajoi katua pitkin?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
