簡體   English   中英

“ stdio”和“ stdlib”在C中代表什么?

[英]What does “stdio” and “stdlib” stand for in C?

哪里有解釋所有速記庫名稱的地方? 我不需要有關庫功能的文檔,我只想知道標題的縮寫。 他們是縮寫嗎?

好的,然后如何獲取列表:

  • “ stdio”:標准輸入/輸出
  • “ stdlib”:標准庫
  • “ printf”:打印格式
  • “ fprintf”:格式化文件的打印(“格式化為文件的打印”)
  • “ sprintf”:格式化的字符串打印(“格式化為字符串的打印”)
  • “ vfprintf”:可變參數fprintf
  • “ fputc”:文件放入char(“將char放入文件”)
  • “ scanf”:掃描格式
  • “ fread”:已讀取文件(“從文件讀取”)
  • “ pthread”:Posix線程
  • “ uint16_t”:無符號整數類型,16位寬
  • “ sigatomic_t”:可以在信號處理程序中原子訪問的類型
  • 通常為“ _t”:為標准庫中的類型名稱保留的后綴。
  • “ float”:浮點數
  • “ 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”:標記化字符串
  • “戰俘”:力量
  • “ frexp”:小數部分(有效位數)和指數
  • “ abs”:絕對值
  • “ malloc”:內存分配
  • “ calloc”:分配並闡明初始狀態為零
  • “ wcsrtombs”:寬字符串到多字節字符串,可重入
  • “ wctomb”:寬字符到多字節字符
  • “ iconv”:???
  • “ uconv”:ICU版本的“ iconv”

標准I / O(輸入輸出)和標准庫

您想知道如何為自己找到這些。 (我喜歡Kerrek SB的列表,但不能怪您想知道如何自行查看這些內容。)

首先,第一件事:如果您使用的是Debian或Ubuntu,我強烈建議您除了通常的manpages軟件包之外,還安裝manpages-posixmanpages-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

我還建議安裝dictdictddict-jargondict-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"
$ 

(搞笑,對嗎?沒有您想要的一種。但是,它們仍然是很棒的工具。)

標准輸入/輸出

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

“ ...使用C標准輸入和輸出庫(cstdio,在C語言中稱為stdio.h)”

stdlib:標准庫

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

“ C標准通用實用程序庫此標頭定義了幾個通用功能...”

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM