Question: what is strdup function in c?
Answer: The function strdup() is used to duplicate a string. It returns a pointer to null-terminated byte string. Here is the syntax of strdup() in C language, char *strdup(const char *string);