📅  最后修改于: 2022-03-11 15:04:44.090000             🧑  作者: Mango
//The issue is that you probably have an uninitialized variable.
//Instead of:
char *fnam;
int nn = sprintf(fnam,"%s/%s",cwd,filnam);
//Try:
char fnam[500];
int nn = sprintf(fnam,"%s/%s",cwd,filnam);