Strings in C | Q - 6

Last Updated :
Discuss
Comments

What is the difference between strcpy() and strncpy()?

strncpy() does not require null termination

strncpy() copies only one character

strncpy() allows specifying the number of characters to copy

No difference

Tags:
Share your thoughts in the comments