?? gets.c
字號:
/* * gets.c - read a line from a stream *//* $Header: /cvsup/minix/src/lib/stdio/gets.c,v 1.1.1.1 2005/04/21 14:56:35 beng Exp $ */#include <stdio.h>char *gets(char *s){ register FILE *stream = stdin; register int ch; register char *ptr; ptr = s; while ((ch = getc(stream)) != EOF && ch != '\n') *ptr++ = ch; if (ch == EOF) { if (feof(stream)) { if (ptr == s) return NULL; } else return NULL; } *ptr = '\0'; return s;}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -