반응형
char * gets(char *buf)
#include <stdio.h> __warn_references(gets, "warning: gets() is very unsafe; consider using fgets()"); char * gets(char *buf) { int c; char *s; for (s = buf; (c = getchar()) != '\n';) if (c == EOF) if (s == buf) return (NULL); else break; else *s++ = c; *s = '\0'; return (buf); }
반응형