Google News
logo
C-Language - Interview Questions
What is the difference between strcpy() and strncpy() functions in C?
strcpy( ) function copies whole content of one string into another string. Whereas, strncpy( ) function copies portion of contents of one string into another string.

If destination string length is less than source string, entire/specified source string value won’t be copied into destination string in both cases.
Advertisement