c strncpy null terminated or not [duplicate]
This question already has answers here : strncpy documentation question (6 answers) Closed 2 years ago . I am reading this document, it says: char *strncpy(char *destination, const char *source, size_t num); Copy characters from string Copies the first num characters of source to destination . If the end of the source C string (which is signaled by a null-character) is found before num characters have been copied, destination is padded with zeros until a total of num characters have been written to it. No null-character is implicitly appended at the end of destination if source is longer than