"stdio"和"stdlib"在C中代表什么?

Mar*_*rty 3 c c++

有没有解释所有速记库名称的地方?我不想要关于库的功能的文档,我只想知道标题的简称.它们是缩写吗?

Ker*_* SB 22

那么,如何获得列表:

  • "stdio":标准输入/输出
  • "stdlib":标准库
  • "printf":打印格式化
  • "fprintf":文件打印格式化("打印格式化为文件")
  • "sprintf":字符串打印格式化("打印格式化为字符串")
  • "vfprintf":可变参数fprintf
  • "fputc":file put char("把char放到文件中")
  • "scanf":扫描格式化
  • "fread":文件读取("从文件中读取")
  • "pthread":Posix线程
  • "uint16_t":无符号整数类型,16位宽
  • "sigatomic_t":可以在信号处理程序中以原子方式访问的类型
  • 通常为"_t":为标准库中的类型名称保留的后缀.
  • "浮动":浮点数
  • "double":双精度浮点数
  • "char":性格
  • "位":二进制数字
  • "fd":文件描述符
  • "fcntl.h":文件控件(Posix文件描述符)
  • "ioctl.h":I/O控制(也是Posix)
  • "stat":文件的状态(也是Posix)
  • "lstat":状态,可能是链接本身
  • "fstat":文件描述符的状态
  • "睡眠":中断正常活动而不支持任何活动
  • "usleep":以微秒(μs)为参数的上述版本,'u'看起来有点像'μ'而基本为ASCII
  • "recv":收到
  • "创造":创造
  • "str":字符串,在C中,这通常是指以null结尾的char数组
  • "strtok":tokenize string
  • "战俘":力量
  • "frexp":小数部分(有效数字)和指数
  • "abs":绝对值
  • "malloc":内存分配
  • "calloc":分配并澄清初始状态为零
  • "wcsrtombs":宽字符串到多字节字符串,可重入
  • "wctomb":宽字符到多字节字符
  • "iconv":???
  • "uconv":ICU版"iconv"

  • `usleep`中的'u`不是必须的.它是micro的μ(μ),因为它的参数是微秒. (7认同)
  • 并且`calloc`没有_clarify_(如检查中)初始状态为零,它主动将位模式设置为零.记住你,那个睡着了的人给了我一点笑声但是,不幸的是,当部分答案是错误的时候没有upvote :-) (2认同)

Ben*_*igt 12

标准I/O(输入 - 输出)和标准库

  • @Frederick:"std"是"标准"的非常常见的缩写. (4认同)

sar*_*old 10

你想知道如何为自己找到这些.(我喜欢Kerrek SB的名单,但我不能责怪你想知道如何自己看这些东西.)

首先要做的事情:如果您使用的是Debian或Ubuntu,我强烈建议您在常用软件包之外安装manpages-posixmanpages-posix-dev软件包manpages.除了Linux man-pages项目之外,这些还允许您访问标准.

差异立即可见:

man 2 close       # gives you the Linux documentation of the system call
man 3posix close  # gives you the POSIX definition of the function
Run Code Online (Sandbox Code Playgroud)

您还可以看到不太可能是系统调用的函数的区别:

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
Run Code Online (Sandbox Code Playgroud)

我还建议在安装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"
$ 
Run Code Online (Sandbox Code Playgroud)

(好笑,对吧?没有你想要的那个.但是,它们仍然是很棒的工具.)


don*_*ton 5

stdio:标准输入/输出

http://www.cplusplus.com/reference/clibrary/cstdio/

"...使用C标准输入和输出库(cstdio,在C语言中称为stdio.h)"

stdlib:标准库

http://www.cplusplus.com/reference/clibrary/cstdlib/

"C标准通用实用程序库此标题定义了几个通用功能......"