strncpy 的用法

在官方的文档中,http://www.cplusplus.com/refer…,例程的 strncpy 的用法是: /* strncpy example */ #include <stdio.h> #include <string.h> int main () { char str1[]= "To be or not to be"; char str2[40]; char str3[40]; /* copy to sized buffer (overflo……

阅读全文