473,378 Members | 1,393 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Standards

Hello. I have been reading about all the different standards in C and I
am quite confused, and have a few questions. ()

How is C99 "better" than older versions of C? (or is it?)
What is the "official" C definition nowadays? C99?
What standard does K&R 2nd edition describe?
Where can I get a book that has the latest(or best) standard?
What is the most used standard?

What books should every C programmer have? (I allready have K&R 2)

--
Ian Tuomi
Jyväskylä, Finland

"Very funny scotty, now beam down my clothes."

NOTE: Remove NOSPAM from address

Nov 13 '05 #1
13 2172
Ian Tuomi wrote:
Hello. I have been reading about all the different standards in C and I
am quite confused, and have a few questions. ()

How is C99 "better" than older versions of C? (or is it?)
What is the "official" C definition nowadays? C99?
I think so, but I loose track :P
What standard does K&R 2nd edition describe?
ansi
Where can I get a book that has the latest(or best) standard?
What is the most used standard?

What books should every C programmer have? (I allready have K&R 2)

That should do you good for the language itself, no other book I have
seen compares adiquately.

Besides that you will want something specific to certain areas of
programming, for instance you might want a Unix programmer book or
something on game programming....depending on your area of interest.
Standard C will not get you very far, you need to break away from
"stardand C" and learn other standards, like POSIX or OpenGL, to become
effective. Since this is such a wide topic I can't recommend anything,
you will want to go to a programmer group in your area of interest and
ask about good books there.

--
Noah Roberts
- "If you are not outraged, you are not paying attention."

Nov 13 '05 #2
Ian Tuomi wrote:
What is the "official" C definition nowadays? C99?
Yes, C99, otherwise known as ISO/IEC 9899:1999. There have also been
a couple of (very minor) updates since C99 came out.
What standard does K&R 2nd edition describe?
K&R was written shortly before C89 was released. With some small
exceptions, it describes C89.
Where can I get a book that has the latest(or best) standard?
C99 is available in electronic form from http://webstore.ansi.org and
in book form, ISBN 0470845732 (e.g. from <URL:
http://www.compman.co.uk/cgi-win/browse.exe?ref=530551> ).
What is the most used standard?


C89 is very widely implemented. There are very few conforming C99
implementations at the moment, although an increasing number of
vendors are adding at least some of the new features.

Jeremy.
Nov 13 '05 #3
Ian Tuomi <ia*******@co.jyu.fi> wrote:
Hello. I have been reading about all the different standards in C and I
am quite confused, and have a few questions. ()

How is C99 "better" than older versions of C? (or is it?)
That's a list of changes, taken from the current standard itself:

[...] Major changes from the previous edition include:

— restricted character set support via digraphs and <iso646.h>
(originally specified in AMD1)
— wide character library support in <wchar.h> and <wctype.h> (originally
specified in AMD1)
— more precise aliasing rules via effective type
— restricted pointers
— variable-length arrays
— flexible array members
— static and type qualifiers in parameter array declarators
— complex (and imaginary) support in <complex.h>
— type-generic math macros in <tgmath.h>
— the long long int type and library functions
— increased minimum translation limits
— additional floating-point characteristics in <float.h>
— remove implicit int
— reliable integer division
— universal character names (\u and \U)
— extended identifiers
— hexadecimal floating-point constants and %a and %A printf/scanf
conversion specifiers
— compound literals
— designated initializers
— // comments
— extended integer types and library functions in <inttypes.h> and
<stdint.h>
— remove implicit function declaration
— preprocessor arithmetic done in intmax_t/uintmax_t
— mixed declarations and code
— new block scopes for selection and iteration statements
— integer constant type rules
— integer promotion rules
— macros with a variable number of arguments
— the vscanf family of functions in <stdio.h> and <wchar.h>
— additional math library functions in <math.h>
— floating-point environment access in <fenv.h>
— IEC 60559 (also known as IEC 559 or IEEE arithmetic) support
— trailing comma allowed in enum declaration
— %lf conversion specifier allowed in printf
— inline functions
— the snprintf family of functions in <stdio.h>
— boolean type in <stdbool.h>
— idempotent type qualifiers
— empty macro arguments
— new struct type compatibility rules (tag compatibility)
— additional predefined macro names
— _Pragma preprocessing operator
— standard pragmas
— _ _func_ _ predefined identifier
— VA_COPY macro
— additional strftime conversion specifiers
— LIA compatibility annex
— deprecate ungetc at the beginning of a binary file
— remove deprecation of aliased array parameters
— conversion of array to pointer not limited to lvalues
— relaxed constraints on aggregate and union initialization
— relaxed restrictions on portable header names
— return without expression not permitted in function that returns a
value (and vice versa)

What is the "official" C definition nowadays? C99?
ISO/IEC 9899:1999, short C99

What standard does K&R 2nd edition describe?
It is based on a draft version of ANSI C89.

Where can I get a book that has the latest(or best) standard?
The standard itself, of course:

The C Standard
by British Standards Institute
Published by John Wiley & Sons Ltd
750+ pages
ISBN 0-470-84573-2

I paid 55,- EUR at my local book store. It's worth it.

Also available as PDF document, you should be able to find the order
form via http://www.dkuug.dk/JTC1/SC22/WG14/.

What is the most used standard?
Currently C89/C90, as of now there are only few (no?) fully conforming
implementations of C99.
What books should every C programmer have? (I allready have K&R 2)


K&R2 will do fine, especially when accompanied by the standard itself.
You can find more recommendations in Section 20 of the c.l.c-faq,
residing at http://www.eskimo.com/~scs/C-faq/top.html .

HTH

Regards
--
Irrwahn
(ir*******@freenet.de)
Nov 13 '05 #4
In article <bm**********@phys-news1.kolumbus.fi>,
Ian Tuomi <ia*******@co.jyu.fi> wrote:
Hello. I have been reading about all the different standards in C and I
am quite confused, and have a few questions. ()

How is C99 "better" than older versions of C? (or is it?)
It adds some features to the language that may be useful. Whether they
are in fact useful for what you want to do, combined with considerations
like availability of implementations (which will improve as time goes on),
determines whether it is in fact "better".

What is the "official" C definition nowadays? C99?
C99 (properly known as "ANSI/ISO/IEC 9899:1999", if I've gotten the order
of the organization-name TLAs in the name correct) is the most recent
formal definition and probably has the best claim to being "official".
C90 (9899:1990) is probably more useful to you as a programmer, since
it's the one that most of the implementations you'll use and most of
the code you'll work with were written for.

What standard does K&R 2nd edition describe?
C90, with a few "errors" in things that were changed between the late
drafts of the standard (which the first printing of the book was based
on) and the final version and that were missed in the update to the book.
(If you manage to find a first printing of K&R2, it in fact describes
late-draft C89. I would assume that these are fairly rare, especially
if you're buying your copy new.)

Where can I get a book that has the latest(or best) standard?
You can get C99 in electronic format from a few different standards
organizations as well as in book form, as other posters have noted.

What is the most used standard?
C90, often (but not anywhere near universally) used with extra extensions
to handle things like networking and graphics that the C standard
doesn't define.

What books should every C programmer have? (I allready have K&R 2)


K&R2 and a copy of the standard (either electronic or hard-copy) are
about the only C-specific books you'll need.

Besides language references, every programmer's library should include:
-General books on programming - Knuth is the canonical "If you're *really*
serious about it, you should get this one" book, but you'll probably
also want to get something a little bit more cookbook-ish for when
you don't have the time or energy to work through the theory behind
something. There are a lot of good books that discuss algorithms,
data structures, and program design; one or two of these will be
Very Helpful.
-References on any APIs you'll be using. A good Unix book if you're
writing Unix programs, a good Windows book if you're writing Windows
programs, a good network programming book if you're writing programs
that talk to a network, a good OpenGL book if you're using OpenGL... you
get the idea.

If you're working in a cold office, something like C for Dummies or
anything by Schildt might also be useful - if you get too cold, you can
always burn a few pages from them to keep warm.
dave

--
Dave Vandervies dj******@csclub.uwaterloo.ca
Perhaps you should reflect on the fact that books are seldom sold by the
kilogram.
--Kevin Easton in comp.lang.c
Nov 13 '05 #5
On Fri, 17 Oct 2003, Ian Tuomi wrote:
Hello. I have been reading about all the different standards in C and I
am quite confused, and have a few questions. ()

How is C99 "better" than older versions of C? (or is it?)
A new standard is usually a response to people being dissatisfied with the
old standard. To some people the C99 standard might not be considered
"better" or to people who did not like features of the old standard they
might appreciate the changes in C99.
What is the "official" C definition nowadays? C99?
Not sure what you mean by "official". A lot of compilers are still using
the old standard. So does "official" mean the most widely available? Or
does it mean the last update to the standard?
What standard does K&R 2nd edition describe?
K&R 2nd edition was created before 1999 so it would be for the older
standard.
Where can I get a book that has the latest(or best) standard?
The standard can be purchased online from ISO at http://www.iso.ch/. Enter
the web site and look for a link to the ISO Store.
What is the most used standard?
I believe the most used C standard is the ISO/IEC 9899:1990 (or ANSI
9899:1989) since compilers which support 9899:1999 are harder to find.
What books should every C programmer have? (I allready have K&R 2)
A copy of the standard would be the next step.
--
Ian Tuomi
Jyväskylä, Finland

"Very funny scotty, now beam down my clothes."

NOTE: Remove NOSPAM from address


--
Send e-mail to: darrell at cs dot toronto dot edu
Don't send e-mail to vi************@whitehouse.gov
Nov 13 '05 #6
Irrwahn Grausewitz <ir*******@freenet.de> wrote:

Ian Tuomi <ia*******@co.jyu.fi> wrote:
<snip>
What standard does K&R 2nd edition describe?


It is based on a draft version of ANSI C89.


I wonder nobody has objected to this.

K&R1 is based on a late draft of C89.
K&R2 is based on final C89.
--
Irrwahn
(ir*******@freenet.de)
Nov 13 '05 #7
Irrwahn Grausewitz wrote:
Irrwahn Grausewitz <ir*******@freenet.de> wrote:

Ian Tuomi <ia*******@co.jyu.fi> wrote:
<snip>
What standard does K&R 2nd edition describe?
It is based on a draft version of ANSI C89.


I wonder nobody has objected to this.


Nobody objected because it's correct.
K&R1 is based on a late draft of C89.
K&R2 is based on final C89.


Nope. K&R1 was published in 1978. The ANSI standardisation process
for C began in 1983. K&R2 was published in 1988 and the first ANSI C
standard was published at the end of the following year.

Jeremy.
Nov 13 '05 #8
Jeremy Yallop <je****@jdyallop.freeserve.co.uk> wrote:
Irrwahn Grausewitz wrote:
Irrwahn Grausewitz <ir*******@freenet.de> wrote:

Ian Tuomi <ia*******@co.jyu.fi> wrote:
<snip>
What standard does K&R 2nd edition describe?

It is based on a draft version of ANSI C89.


I wonder nobody has objected to this.


Nobody objected because it's correct.
K&R1 is based on a late draft of C89.
K&R2 is based on final C89.


Nope. K&R1 was published in 1978. The ANSI standardisation process
for C began in 1983. K&R2 was published in 1988 and the first ANSI C
standard was published at the end of the following year.


Oh boy, now I've miscorrected my own post. <sigh>
Thanks for re-correction.
--
Irrwahn,
insert coin to engage my brain.
--
Irrwahn
(ir*******@freenet.de)
Nov 13 '05 #9
In <bm************@ID-114079.news.uni-berlin.de> Jeremy Yallop <je****@jdyallop.freeserve.co.uk> writes:
Ian Tuomi wrote:
What is the "official" C definition nowadays? C99?


Yes, C99, otherwise known as ISO/IEC 9899:1999. There have also been
a couple of (very minor) updates since C99 came out.

^^^^^^^^^^^
I'm only aware of TC1. What am I missing?

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 13 '05 #10
In <bm************@ID-114079.news.uni-berlin.de> Jeremy Yallop <je****@jdyallop.freeserve.co.uk> writes:
Nope. K&R1 was published in 1978. The ANSI standardisation process
for C began in 1983. K&R2 was published in 1988 and the first ANSI C
standard was published at the end of the following year.


However, the 2nd and later printings of K&R2 postdate the C89 standard and
were updated to actually describe it, rather than the draft the first
printing was based on. To know which flavour of the book you have, simply
look at its cover: it clearly states whether the book is covering the
draft or the actual standard.

Note that the update was not 100% accurate, there are a few minor
differences between the draft and C89 that haven't yet been fixed in
the book.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 13 '05 #11
Dan Pop wrote:
In <bm************@ID-114079.news.uni-berlin.de> Jeremy Yallop <je****@jdyallop.freeserve.co.uk> writes:
Ian Tuomi wrote:
What is the "official" C definition nowadays? C99?


Yes, C99, otherwise known as ISO/IEC 9899:1999. There have also been
a couple of (very minor) updates since C99 came out.

^^^^^^^^^^^
I'm only aware of TC1. What am I missing?


Hmm. Reading that again I'm not sure what I was thinking of. Perhaps
TC2 to C90. Sorry about that.

Jeremy.
Nov 13 '05 #12
Dan Pop wrote:
In <bm************@ID-114079.news.uni-berlin.de> Jeremy Yallop <je****@jdyallop.freeserve.co.uk> writes:
Nope. K&R1 was published in 1978. The ANSI standardisation process
for C began in 1983. K&R2 was published in 1988 and the first ANSI C
standard was published at the end of the following year.
However, the 2nd and later printings of K&R2 postdate the C89 standard and
were updated to actually describe it, rather than the draft the first
printing was based on. To know which flavour of the book you have, simply
look at its cover: it clearly states whether the book is covering the
draft or the actual standard.


Thanks for the clarification.
Note that the update was not 100% accurate, there are a few minor
differences between the draft and C89 that haven't yet been fixed in
the book.


Are these things that aren't in the errata either? If so, what are
they?

Jeremy.
Nov 13 '05 #13
In <bn************@ID-114079.news.uni-berlin.de> Jeremy Yallop <je****@jdyallop.freeserve.co.uk> writes:
Dan Pop wrote:
Note that the update was not 100% accurate, there are a few minor
differences between the draft and C89 that haven't yet been fixed in
the book.


Are these things that aren't in the errata either? If so, what are
they?


I suspect that, 14 years after the release of C89, all the bugs have been
reported to the authors and included in the errata. Unfortunately, they
have not been corrected in the more recent printings of the book.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 13 '05 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: MarionEll | last post by:
XML 2003 Interoperability Demonstrations to Showcase Industry Standards, Integrated Vendor Solutions Alexandria, VA – Nov. 19, 2003 – IDEAlliance, a leading trade association dedicated...
162
by: Isaac Grover | last post by:
Hi everyone, Just out of curiosity I recently pointed one of my hand-typed pages at the W3 Validator, and my hand-typed code was just ripped to shreds. Then I pointed some major sites...
4
by: dotNetDave | last post by:
About three weeks ago I released the first .NET coding standards book titled "VSDN Tips & Tricks .NET Coding Standards". Here is what the famous author/ speaker Deborah Kurata says about it: ...
17
by: Ian | last post by:
Hi there, Can anybody tell me where I can find a standards documents like you have in c#. I am trying to write javascript and would like to know what standards are i.e. Where to put the...
23
by: Mario T. Lanza | last post by:
I have been authoring web sites for several years now and recently come to value web standards (as touted by Zeldman and many other web gurus). I have noticed with frustration that there are so...
250
by: Sugapablo | last post by:
Just out of curiosity, while checking on a site I was working on, I decided to throw a couple of the web's most popular URLs into the W3C Markup Validator. Out of microsoft.com, google.com,...
115
by: junky_fellow | last post by:
What is a C object ? If i have some function "func()" in my C program, then can i say that "func()" is a C object ? or if i have some function pointer (ptr) which contains the address of...
9
by: Jason Gogela | last post by:
Does anyone out there know why I should care whether a <span> is nested in a <p> or vice versa? What is the bennafit of adhering to this standard? It seems to me that regardless of which way you...
3
by: editormt | last post by:
A recent poll asked if programming standards are used by development organisations... and if they are controlled. None: 20% Yes, but without control: 49% Yes, with control: 31% Participants:...
53
by: Jim Cook | last post by:
I previously had asked if there was an online standards file so I could read that and answer my own questions without posting here and getting flamed for not having done my homework. I was...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.