April 26th, 2013, 04:11 PM
Join Date: Apr 2013
Time spent in forums: 2 m 26 sec
Reputation Power: 0
HELP ME SOLVE a cahllenge need help please!!!
* - Look at main(): it calls various functions.
* - You are asked to implement two functions: str_cpy() and str_cat().
* - Reading main() carefully will allow to understand str_cpy() and str_cat()
* signature and usage.
* - The code you write needs to be "library quality"; as good as you would
* expect a good libc to implement such functions.
* - At the top of the page, you see 4 includes - indicating the functions that
* can be used to implement str_cpy() and str_cat().
* FYI: it is possible to implement str_cpy() and str_cat() efficiently in no
* more than 7 lines of code per function, and in less than 5 minutes.
* Good luck!
int main(int argc, char *argv)
char *s = NULL;
str_cpy(&s, "Hola Hola");
str_cat(&s, " Mundo");
puts(s); /* result: "Hola Mundo!" */