Is there something like the official C documentation? [closed]
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.
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.
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.
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).
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.
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.
See also the material at http://www.coding-guidelines.com/ and http://c0x.coding-guidelines.com/.
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:
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
There is this online website devdocs
They have multiple API documentations which are well organized. It is free and open-source.
For c doc click this link http://devdocs.io/c/
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.
However, you can download a free draft version from 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.
More info here: http://c-faq.com/ansi/avail.html
Is there something like the official C documentation?
The most official documentation is the ISO standard, to which compilers are written and are expected to interpret correctly.
C99 Standard
Here's the latest Committee draft on the C99 Standard, last updated April 12, 2011:
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
However, I'd use the -Wall
flag when compiling the examples in the book so that you don't get led too far astray by the age of the text.