C语言 有没有类似官方 C 文档的东西?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4233925/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is there something like the official C documentation?
提问by Auron
I'm looking for the documentation of all the syntax and built-in functions in C, but I can't find any site online which seems like an ultimate official source of standard C knowledge.
我正在寻找 C 语言中所有语法和内置函数的文档,但我在网上找不到任何网站,这似乎是标准 C 知识的最终官方来源。
Apart from the famous book by Kernighan and Ritchie, isn't there any online C specification? Maybe there is, and I don't know how to find it. Or maybe the problem is that I don't exactly know what I'm looking for.
除了Kernighan 和 Ritchie 的那本著名的书之外,没有任何在线 C 规范吗?也许有,我不知道如何找到它。或者也许问题是我不完全知道我在寻找什么。
采纳答案by Jonathan Leffler
You can obtain a PDF copy of the C99 standard (ISO/IEC 9899:1999) from ANSI (and other fine standards organizations) for your private use for a modest fee - I believe it was 18 USD when I bought mine. Having that available is invaluable to me. But if you find a copy in public, then it is contraband.
您可以以适度的费用从 ANSI(和其他优秀的标准组织)获得 C99 标准(ISO/IEC 9899:1999)的 PDF 副本供您私人使用——我相信我买的时候是 18 美元。拥有它对我来说是无价的。但如果你在公共场合找到了一份副本,那么它就是违禁品。
You can find final committee drafts and current working documents of the C (C0x) Standard Committee at the JTC1, SC22, WG14 web site at the Open Standards Organization. (That's Joint Technical Committee 1, Sub-Committee 22, Working Group 14, I believe).
您可以在开放标准组织的 JTC1、SC22、WG14 网站上找到 C (C0x) 标准委员会的最终委员会草案和当前工作文件。(我相信是第 1 联合技术委员会、第 22 分委员会、第 14 工作组)。
There is also a hardback book 'The C Standard: Incorporating Technical Corrigendum 1'(also including the Rationale) available for a slightly less modest 85 USD or thereabouts.
还有一本精装书“The C Standard: Incorporating Technical Corrigendum 1”(也包括基本原理),售价 85 美元左右。
One of the best books about C is 'C: A Reference Manual'in its fifth edition. However, you asked for 'ultimate official source of standard C knowledge', and the only 'official' such source is the C standard, plus its corrigenda.
关于 C 的最好的书之一是第五版的“C:参考手册”。但是,您要求提供“标准 C 知识的最终官方来源”,而唯一的“官方”此类来源是 C 标准及其勘误表。
See also the material at http://www.coding-guidelines.com/and http://c0x.coding-guidelines.com/.
另请参阅http://www.coding-guidelines.com/和http://c0x.coding-guidelines.com/ 上的材料。
回答by R.. GitHub STOP HELPING ICE
The official C99 standard is available for purchase from your national standards body; however, in practice everyone reads the draft with post-1999 corrections/amendments included, which you can download for free:
官方 C99 标准可从您的国家标准机构购买;然而,实际上每个人都会阅读包含 1999 年后更正/修正的草稿,您可以免费下载:
回答by AbdullahC
Strictly speaking, the C standard is not available for free. You need to purchase an electronic copy from http://www.ansi.org/or http://www.iso.org.
严格来说,C 标准不是免费提供的。您需要从http://www.ansi.org/或http://www.iso.org购买电子副本。
However, you can download a free draft versionfrom the Open Standards Organization's website - this is as good as or better than the official standard itself. It incorporates information from the ISO C99 standard plus three Technical Corrigenda, all of which are official ISO documents.
但是,您可以从开放标准组织的网站下载免费的草案版本——这与官方标准本身一样好或更好。它包含来自 ISO C99 标准的信息和三个技术勘误表,所有这些都是官方 ISO 文件。
More info here: http://c-faq.com/ansi/avail.html
更多信息在这里:http: //c-faq.com/ansi/avail.html
回答by basavaraj_S
There is this online website devdocs
有这个在线网站devdocs
They have multiple API documentations which are well organized. It is free and open-source.
他们有多个组织良好的 API 文档。它是免费和开源的。
For c doc click this link http://devdocs.io/c/
对于 c 文档,请单击此链接http://devdocs.io/c/
回答by Cat Plus Plus
C is an ISO standardised language. Current specification is ISO/IEC 9899:1999standard a.k.a. C99.
C 是一种 ISO 标准化语言。当前的规范是ISO/IEC 9899:1999标准又名 C99。
回答by Aaron Hall
Is there something like the official C documentation?
有没有类似官方 C 文档的东西?
The most official documentation is the ISO standard, to which compilers are written and are expected to interpret correctly.
最官方的文档是 ISO 标准,编译器按照该标准编写并被期望正确解释。
C99 Standard
C99标准
Here's the latest Committee draft on the C99 Standard, last updated April 12, 2011:
这是关于 C99 标准的最新委员会草案,最后更新于 2011 年 4 月 12 日:
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf
I'll try to keep it up to date with the latest version as I can.
我会尽量让它与最新版本保持同步。
Kernighan & Ritchie
克尼汉和里奇
I also found K&R's text, second edition, here: http://www.ime.usp.br/~pf/Kernighan-Ritchie/C-Programming-Ebook.pdf
我还在这里找到了 K&R 的文本,第二版:http: //www.ime.usp.br/~pf/Kernighan-Ritchie/C-Programming-Ebook.pdf
However, I'd use the -Wallflag when compiling the examples in the book so that you don't get led too far astray by the age of the text.
然而,我会-Wall在编译书中的例子时使用这个标志,这样你就不会被文本的年龄误导得太远。
回答by Aravin
You can refer GNU C documentation at https://www.gnu.org/software/gnu-c-manual/gnu-c-manual.html
您可以在https://www.gnu.org/software/gnu-c-manual/gnu-c-manual.html 上参考 GNU C 文档
Specifically, this manual aims to document:
具体而言,本手册旨在记录:
- The 1989 ANSI C standard, commonly known as “C89”
- The 1999 ISO C standard, commonly known as “C99”, to the extent that C99 is implemented by GCC
- The current state of GNU extensions to standard C
- 1989 ANSI C 标准,俗称“C89”
- 1999 ISO C 标准,俗称“C99”,C99 是由 GCC 实现的
- 标准 C 的 GNU 扩展的当前状态
回答by user6147887
https://msdn.microsoft.com/en-us/library/fw5abdx6.aspxThe "C Language Reference" describes the C programming language as implemented in Microsoft C. The book's organization is based on the ANSI C standard with additional material on the Microsoft extensions to the ANSI C standard.
https://msdn.microsoft.com/en-us/library/fw5abdx6.aspx“C 语言参考”描述了在 Microsoft C 中实现的 C 编程语言。本书的组织基于 ANSI C 标准,并在Microsoft 对 ANSI C 标准的扩展。
回答by Falcon
There're various C standard specifications.
有各种 C 标准规范。
See C's history on wikipediafor example.
例如,请参阅维基百科上的 C 历史。
When we talk about standard C these days, we mostly refer to the ANSI C Standard.
如今,当我们谈论标准 C 时,我们主要指的是ANSI C 标准。
Here's a link to the standard in textform: http://flash-gordon.me.uk/ansi.c.txt
这是文本格式的标准链接:http: //flash-gordon.me.uk/ansi.c.txt
回答by Steven D. Majewski
If what you want is the documentation for the standard library functions, then P.J. Plauger's "The Standard C Library" http://www.amazon.com/Standard-C-Library-P-J-Plauger/dp/0131315099/ref=sr_1_1?s=books&ie=UTF8&qid=1290273108&sr=1-1is the best reference. It's got pretty extensive annotation and comentary on the why and how of the standard.
如果您想要的是标准库函数的文档,那么 PJ Plauger 的“标准 C 库” http://www.amazon.com/Standard-C-Library-PJ-Plauger/dp/0131315099/ref=sr_1_1? s=books&ie=UTF8&qid=1290273108&sr=1-1是最好的参考。它对标准的原因和方式有相当广泛的注释和评论。

