⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gets.3

📁 Unix操作系统minix 2.0源码
💻 3
字号:
.\"	@(#)gets.3s	6.1 (Berkeley) 5/15/85.\".TH GETS 3  "May 15, 1985".AT 3.SH NAMEgets, fgets \- get a string from a stream.SH SYNOPSIS.nf.ft B#include <stdio.h>char *gets(char *\fIs\fP)char *fgets(char *\fIs\fP, int \fIn\fP, FILE *\fIstream\fP).ft R.fi.SH DESCRIPTION.B Getsreads a string into.I sfrom the standard input stream.BR stdin .The string is terminated by a newlinecharacter, which is replaced in.I sby a null character..B Getsreturns its argument..PP.B Fgetsreads .IR n \-1characters, or up through a newlinecharacter, whichever comes first,from the.I streaminto the string.IR s .The last character read into.I sis followed by a null character..B Fgetsreturns its first argument..SH "SEE ALSO".BR puts (3),.BR getc (3),.BR scanf (3),.BR fread (3),.BR ferror (3)..SH DIAGNOSTICS.B Getsand.B fgetsreturn the constant pointer .SM.B NULLupon end of file or error..SH BUGS.B Getsdeletes a newline,.B fgetskeeps it,all in the name of backward compatibility..PP.B Getsis not present in the Minix-vmd C library for reasons that should be obvious.Use.B fgetsinstead.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -