gets与puts不检查边界,在linux下提示危险

使用fgets,fputs

例如:

fgets(str, 20, stdin);
fputs(str, stdout);

posted @ 2021-04-22 17:29  8重8  阅读(87)  评论(0)    收藏  举报