1

私の大学のコンピュータ サイエンス コースの一環として、C を学ぶ必要があります。私の講師は、K&R の The C Programming Language 2nd Edition を勧めました。最初の数ページを読んだ後、この本は完全なガイドではなく、時々誤解を招く可能性があると明確に述べられているので、この本からCを「学ぶ」べきかどうか疑問に思っていますか? (これもかなり古い本)

私は基本的な Java のバックグラウンドを持っているので、プログラムの基本的な要素 (vars、データ型、ループなど) を理解しているので、C 構文を見てそれほどショックを受けることはありません。

4

1 に答える 1

8

K&R is the standard text to learn C from. It is also considered a standard and you can request K&R standard in certain compilers (e.g. gcc). There is also a formatting type named after the book. Just use it - it's concise and to the point.

A comment about it's age - the book is not old if you consider C and it's various standards and dialects. I have yet to work on a project which uses C11 (the newest standard) and a lot of companies and projects will explicitly use an old standard in bleeding edge technology (e.g. c89). Also a lot of companies insist on K&R compatibility and some even insist on K&R code formatting style.

Can I also make sure that you don't think of C as say Python where each version pretty much obsoletes the older version. C and it's standards do not age in the sense that they are standards - you pick one that suits your needs. C89 is as new today (2013) as it was in 89. Don't quote me on this one but I am fairly confident that ansi C (C89) is the most widely used standard and "The C Programming Language" deals namely with ansi C.

Another very good book is "The C Book". I think it is an excellent book but it is even older than K&R.

Have a look here:

http://en.wikipedia.org/wiki/The_C_Programming_Language

http://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#C-Dialect-Options

http://en.wikipedia.org/wiki/ANSI_C

于 2013-10-13T13:16:02.637 に答える