"stdio" 和 "stdlib" 在 C 中代表什么?
What does "stdio" and "stdlib" stand for in C?
有什么地方可以解释所有的简写库名称吗?我不想要关于图书馆功能的文档,我只想知道标题的缩写是什么。它们是缩写吗?
好吧,那么让一个列表开始吧:
- "stdio":标准输入/输出
- "stdlib":标准库
- "printf":打印格式
- "fprintf":文件打印格式("打印格式为文件")
- "sprintf":字符串打印格式("打印格式为字符串")
- "vfprintf":可变fprintf
- "fputc":file put char("将char放入文件")
- "scanf":扫描格式
- "fread":文件读取("从文件读取")
- "pthread":Posix线程
- "uint16_t":无符号整数类型,16位宽
- "sigatomic_t":可以在信号处理程序中原子访问的类型
- "_t"在一般情况下:为标准库中的类型名称保留的后缀
- "float":浮点数
- "double":双精度浮点数
- "char":字符
- "bit":二进制数字
- "fd":文件描述符
- "fcntl.h":文件控制(Posix文件描述符)
- "ioctl.h":I/O控制(也称为Posix)
- "stat":文件的状态(也称为Posix)
- "lstat":状态,可能是链接本身的状态
- "fstat":文件描述符的状态
- "睡眠":中断正常活动而完全不活动
- "usleep":上面的版本,参数以微秒(µs)为单位,"u"看起来有点像"µ",同时是基本的ASCII
- "recv":接收
- "create":创建
- "str":string,在C中,它通常指以null结尾的char数组
- "strtok":标记化字符串
- "pow":力量
- "frexp":小数部分(有效位)和指数
- "abs":绝对值
- "malloc":内存分配
- "calloc":分配并澄清初始状态为零
- "wcsrpyrams":宽字符串到多字节字符串,可重入
- "wc坟墓":宽字符到多字节字符
- "iconv":
- "uconv":ICU版本的"iconv"
标准I/O(输入输出)和标准库
您想知道如何自己找到这些。(我喜欢Kerrek SB的列表,但我不能责怪你想知道如何自己查找这些东西。)
首先:如果你在Debian或Ubuntu上,我强烈建议你除了安装通常的manpages
包外,还安装manpages-posix
和manpages-posix-dev
包。除了Linux手册页项目之外,还可以使用这些标准。
差异通过立即可见
man 2 close # gives you the Linux documentation of the system call
man 3posix close # gives you the POSIX definition of the function
您还可以看到不太可能是系统调用的函数的差异:
man 3 qsort # Linux man-pages project describing the glibc function
man 3posix qsort # POSIX standard definition of the function, should be useful
description for any POSIX-compliant system
我还建议安装dict
、dictd
和dict-jargon
或dict-foldoc
(或两者)软件包:
$ dict stdin
2 definitions found
From The Free On-line Dictionary of Computing (26 July 2010) [foldoc]:
standard input/output
standard I/O
stderr
stdin
stdio
stdout
<programming, operating system> The predefined input/output
channels which every {Unix} process is initialised with.
Standard input is by default from the terminal, and standard
output and standard error are to the terminal. Each of these
channels (controlled via a {file descriptor} 0, 1, or 2 -
stdin, stdout, stderr) can be redirected to a file, another
device or a {pipe} connecting its process to another process.
The process is normally unaware of such {I/O redirection},
thus simplifying prototyping of combinations of commands.
The {C} programming language library includes routines to
perform basic operations on standard I/O. Examples are
"printf", allowing text to be sent to standard output, and
"scanf", allowing the program to read from standard input.
(1996-06-07)
From V.E.R.A. -- Virtual Entity of Relevant Acronyms (June 2006) [vera]:
STDIN
STandarD INput
$ dict stdlib
No definitions found for "stdlib"
$
(很有趣,对吧?没有你想要的工具。但它们仍然是很棒的工具。)
stdio:标准输入/输出
http://www.cplusplus.com/reference/clibrary/cstdio/
"…使用C标准输入和输出库(cstdio,在C语言中称为stdio.h)"
stdlib:标准库
http://www.cplusplus.com/reference/clibrary/cstdlib/
"C标准通用工具库此标头定义了几个通用函数。。。"
相关文章:
- 为不同配置设置MSVC_RUNTIME_LIBRARY的正确方法是什么
- 警告处理为错误这里有什么问题
- 什么时候调用组成单元对象的析构函数
- #定义c-预处理器常量..我做错了什么
- 努力将整数转换为链表。不知道我在这里做错了什么
- C++我的数学有什么问题,为什么我的代码不能正确循环
- 什么时候在C++中返回常量引用是个好主意
- 当在同一名称空间中有两个具有相同签名的函数时,会发生什么
- C++避免重复声明的语法是什么
- c++库的公共头文件中应该包含什么
- 问题:什么是QAbstractItemView::NoEditTriggers的反面
- 有什么方法可以遍历结构吗
- 当类在C++中定义时,有什么方法可以"register"类吗?
- ifstream什么都没读
- 在C++中,将大的无符号浮点数四舍五入为整数的最佳方法是什么
- 实现无开销push_back的最佳方法是什么
- C++从另一个类访问公共静态向量的正确方法是什么
- "throw expression code" 1e7 >返回 d 是什么?投掷标准::overflow_error( "too big" ) : d;意味 着?
- 我应该使用什么来代替void作为变体中的替代类型之一
- "stdio" 和 "stdlib" 在 C 中代表什么?