Difference between strdup and strcpy?

Difference between strdup and strcpy?


Both copy a string. strcpy wants a buffer to copy into. strdup allocates a buffer using malloc(). Unlike strcpy(), strdup() is not specified by ANSI .

Comments

Popular posts from this blog

JAD Advantages and Disadvantages

What is JAD and how are users involved? What are advantages and disadvantages of JAD?

Examine the collapse of Han. What factors explain how this occurred? How influential in Han Dynasty on Chinese History?