My experience in C is mostly from second edition of The C Programming language which is a very old book. What has changed in C since it was released, what obsolete or deprecated functions should I avoid?
What has changed since “The C Programming Language”
3.5k views Asked by Iceland_jack At
3
There are 3 answers
0
On
Not very much has changed. For most practical purposes, the language described in K&R2 is still the one to use. There has been a new C standard in 1999, but that has not been adopted as successfully and widely as the 1989 version of the standard (which K&R2 also describes).
The most important changes in C99 that could break existing programs are:
- The implicit assumption of type
intin declarations has been removed. Just make sure you always explicitly specify the types of your functions and variables. - Calling a function without a prior declaration is deprecated. Just make sure you declare all functions before use, preferably with a prototype.
Both of these were hold-overs from pre-standard days and have been considered bad-practice for a long time.
The one function to avoid is (and has always been) gets().
You can also look at the 'C' specifications that have come out since (like C99). These specs will indicate what they have added/removed/changed in relation to the previous standard.
http://en.wikipedia.org/wiki/C_%28programming_language%29
http://en.wikipedia.org/wiki/C99
http://en.wikipedia.org/wiki/C89_%28C_version%29
If you want to see what the future holds for 'C', have a look at C1X, which is the upcoming 'C' standard.
http://en.wikipedia.org/wiki/C1x