从上可以看出,snprintf和strncpy用法稍有不同,分别如下: char dst[X]; ... strncpy(dest1, src, sizeof(dest1)-1); printf("dest1[2]=%d,%c\n", ...
確定! 回上一頁