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

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

JAD Advantages and Disadvantages

What are the three dimensions to business problems? Give an example of each.