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?

Under what conditions would you use a watertight barrier instead of well points when digging below the water table?