Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resource that briefly describe the C and C++ standards

Tags:

c++

c

standards

After having an answer here wrong, because I wasn't up to date on the C standard, I started to look for some place that gives a description of whats in the C and C++ standards.

I do not want the complete standards, of which I found links in Where do I find the current C or C++ standard documents?, or intimate technical discussions. Instead I would like something that briefly describes the standard, with references to the actual standard if I want to check it more thoroughly, and maybe saying which standard the feature was introduced in.

Is there such a resource available?

EDIT: A little background to the question: I have been programming C for over 20 years now, and when I learnt it not much was standardized. And what was in the official standard was not widely implemented. Through the years I have become good enough C programmer that my friends and colleges come to me for help when they have problems.

However, when I learned C I was told that things like memory layout for multi-dimensional arrays was implementation specific, and when I saw a question about that subject I said that it wasn't standardized only to be told I was wrong. But even knowing this, I have a hard time finding any place saying that it's in the standard, and it's even harder to find in which standard it was first introduced.

If there was some place saying "Memory layout of multi-dimensional arrays was standardized in C9x, in section Y of the standard document" It would have been easy to find and give this to the person asking the question. I am not intrested in what the actual layout is, just that it has been standardized, and where to look if I really want a definitive answer about it.

This of course goes for other things. Like knowing that header file "<yyy.h>" is mandated by standard "C90", and where in the standard I should look for the rationale and contents of it. It is very difficult to find these things when they are spread out, having it collected in one place would make it much easier to find.

like image 620
Some programmer dude Avatar asked Nov 11 '11 06:11

Some programmer dude


1 Answers

Anything that's not the standard will either be not definitive, or be simplified in such a way as to be far less than useful. And anything definitive or really useful will basically be the standard.

I know of no resource that covers every section of the C standard (or even a sizable number of them) in a simplified way and I would doubt its usefulness. You generally have a specific issue you need solved and, in that case, you would search for that specific issue - the vast majority of people don't need the standard, especially when they have a resource like SO at their fingertips.

If you're a language implementer or enjoy examining the dark corners of the language in excruciating detail, then yes, get the standard, it's invaluable. If you're just using the language day-to-day (even as an expert), you can get by without it, with just a bit of googling (a).


(a) Make sure one of the search terms is site:stackoverflow.com :-)

like image 109
paxdiablo Avatar answered Sep 17 '22 16:09

paxdiablo