C Overview
Table of Contents
- Library
- Books
- The C Book, second edition by Mike Banahan, Declan Brady and Mark Doran
- Programming in C (3rd Edition) by Stephen Kochan
- Expert C Programming: Deep C Secrets
- The Waite Group’s Microsoft C Bible by Nabajyoti Barkakati(DOS)
- C Traps and Pitfalls by Koenig
- The C Programming Language, by Kernighan and Ritchie
- J. Blustein
- Ian Hay's recommended book list
- Homepage
- comp.lang.c Frequently Asked Questions
- clc-wiki
- Literature and links on C
- FTP
- 18. Tools and Resources
- Standards and Style
- Misc
Library
Redis
Redis is an open source, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.
zlog
http://hardysimpson.github.com/zlog/
A reliable pure C logging library.
Numerical Recipes
The GNU C Library (glibc)
from sunsite.unc.edu in pub/packages/development/libraries
SGLIB - A Simple Generic Library for C
Judy
Judy is a C library that provides a state-of-the-art core technology that implements a sparse dynamic array. Judy arrays are declared simply with a null pointer. A Judy array consumes memory only when it is populated, yet can grow to take advantage of all available memory if desired.
ncures
- Homepage:http://www.gnu.org/software/ncurses/
- download: http://ftp.gnu.org/gnu/ncurses/
It uses Terminfo format, supports pads and color and multiple highlights and forms characters and function-key mapping, and has all the other SYSV-curses enhancements over BSD Curses.
- Howto
- NCURSES Programming HOWTO:http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/
- Writing Programs with NCURSES http://invisible-island.net/ncurses/ncurses-intro.html
Books
The C Book, second edition by Mike Banahan, Declan Brady and Mark Doran
Programming in C (3rd Edition) by Stephen Kochan
This book by Steve Kochan is absolutely the best book for anyone
starting out programming in C. This is an excellent introductory text
with frequent examples and good text. This book makes no assumptions
about the particular computer system or operating system on which the
C language is implemented. This books is written for novices and
experienced programmers alike.
Expert C Programming: Deep C Secrets
Peter has written one of the greatest books to hit the computer book
stands in a long time! This is not your typical C book, but is rather
a fun book to read. As I told Peter, most C programming texts are
really boring as all they do is describe the functions, give a
abstract example and then move onto something different. This book is
chock full of real world C stories and folklore, including a story
about the C bug that brought down the AT&T network. I found the
tongue-in-cheek attitude and real world examples/stories very, very
interesting. Run, don’t walk, down to your local store and buy this
book. I really really loved this book, and I read most of it in one
sitting. There is also a great introduction to C++ for C programmers
that will get you started with C++ and Object-Oriented programming.
This book is not for beginners, but is a great second book on C.
The Waite Group’s Microsoft C Bible by Nabajyoti Barkakati(DOS)
This book is a must for every programmer, especially those who program
in the DOS environment. The Bible organizes and simplifies the
information contained in Microsoft’s C library. Each function page
gives the purpose, syntax, example call, includes, common uses,
returns and examples.
C Traps and Pitfalls by Koenig
The C Programming Language, by Kernighan and Ritchie
Ian Hay's recommended book list
GENERAL INTRODUCTION/TUTORIAL:
- For real beginners looking for a solid introduction:
C Programming: A Modern Approach. K.N.King. W.W.Norton & Company, 1996. ISBN 0-393-96945-2
- For somewhat more experienced users looking for a solid introduction:
The C Programming Language, 2nd Ed. Kernigan & Ritchie. Prentice Hall, 1988. ISBN 0-13-110362-8
- Other recommended introductory books:
C: How to Program, 2nd Ed. Deitel, H.M. & Deitel, P.J. Prentice Hall, 1994. ISBN: 0-13-226119-7
REFERENCES:
C : A Reference Manual, 4th Ed. Harbison & Steele. Prentice Hall, 1995. ISBN 0-13-326224-3
The Standard C Library. P.J.Plauger. Prentice Hall, 1992. ISBN 0-13-131509-9
C Programming FAQs Steve Summit Addison-Wesley, 1996. ISBN 0-201-84519-9
ADVANCED TOPICS / FUTHER EXPLORATION:
C Traps and Pitfalls. Andrew Koenig. Addison-Wesley, 1989. ISBN 0-201-17928-8
Expert C Programming: Deep C Secrets Peter Van Der Linden Prentice Hall, 1994. ISBN 0-13-177429-8
Practical C Programming. Steve Oualline. O'Reilly & Associates, 1993. ISBN 1-56592-035-X
Problem Solving And Program Design In C, 2nd Ed. Hanly & Koffman. Addison-Wesley, 1996. ISBN 0-201-59063-8
Algorithms in C, 3rd Ed. Robert Sedgewick Addison-Wesley, 1998. ISBN 0-201-31452-5
comp.lang.c Frequently Asked Questions
clc-wiki
a wiki operating as an offshoot of the comp.lang.c Usenet group. Its aim is to document the C programming language, the comp.lang.c newsgroup and to provide resources related to both.
Literature and links on C1
my personal best-of list
- C - A Reference Manual (Harbison/Steele, Prentice Hall) is simply the best. The longer you have it the more you need it. A must-have!
- C - A Software Engineering Approach (Darnell/Margolis, Springer) is an excellent teaching book. It presents not only the C programming language, but also typical procedures, style elements and programming techniques in a quite readable way.
- Expert C Programming - Deep C Secrets (P. van der Linden, Prentice Hall) is both a very competent book on C and something just fun reading. Contains numerous tips and tricks as well as anecdotes on C and programming in general. I love it.
- The GNU C Library Reference Manual (S. Loosemore, R. Stallman, R. McGrath, A. Oram, U. Drepper, available free in the internet as hypertext document) is one of the basic sources for people who program a lot on Unix-based systems. Though being a reference manual in the first place it also provides good explanations and introductions on the different of the GNU C library.
- Programmieren mit C (Martin Lowes, Augustin Paulik, Teubner Verlag) is a good book for learning concentrating on ANSI-C. It also covers some typical applications like binary trees.
Don't buy these, my personal Hall of Shame
- The Annotated ANSI-C Standard (and anything else by Herbert
Schildt, Osborne) may be the cheapest way to get hold of a printed
copy of the ANSI-C standard, but never read his comments! That's
what not only the [alt.comp.lang.learn.c-c++] - FAQ list
recommends. Like stated by Peter Seebach in comp.lang.c Schildt has
been the founding idea to many a good drinking game. He is said to
have a clear style that leaves the reader confident but dangerously
ignorant. For more information don't hesitate to read some of the
following:
- Clive Feather's review on Schildt's errors.
- Peter Seebach's C: The Complete Nonsense contains some more incredible examples of Schildt's expertise.
- Peter Seebach's April Fool's posting, declaring to pass on the moderation of comp.lang.c.moderated to Herbert Schildt.
- C-Programmierung lernen (Andre Willms, Addison-Wesley, in German language) is a book for the novice constantly using incorrect (in the ANSI sense) code but still stating one needed to use an ANSI-C compiler to try his code examples - haha!
- GoTo C-Programmierung (Guido Krüger, Addison-Wesley, in German language) is for the advanced novice and devastates the C language in a similar manner. Apart from using void main() all the time the book contains numerous survivors from the old K&R-times as well as descriptions of library functions that are plainly wrong when speaking of ANSI-C. My advice: better buy two books that have less than half as many pages but do exactly what they're supposed to do.
- Effektiv Programmieren in C und C++ (Dietmar Herrmann, Vieweg Verlag) is another void main() publication that even goes further by adding a return statement to the end of main(). I still say: A book supporting this rubbish cannot be recommended no matter how good it might be in some other way.
Documents on this server
- Can't Happen or * NOTREACHED * or Real Programs Dump Core
http://herbert.the-little-red-haired-girl.org/dvi/ps/canthappen.ps
(alternatively as PDF File) A rather old but still up-to-date document on programming in C. It is based on the Unix environment and many examples mention implementation details from the mid-eighties' Unix world. However the shocking truth is: nothing has really changed since then, we're still making the same mistakes.
- LCLint User's Guide
Download
LCLint is a tool for statically checking C sources. It is a freely available "advanced lint". The above document covers LCLint as well as some other useful information, like naming conventions etc. HTML online dokument.
- IOCCC-Archiv
http://www.ioccc.org/ The International Obfuscated C Contest is already fairly famous (notorious?) - we get plenty of chaos and fun together with brillant programming skills, in other words: a lot to learn from! dürfte vielen
Other people's collections
- C99 Draft online
http://www.vmunix.com/~gabor/c/draft.html
The ANSI C standard is normally available only for money, but the draft which is normally about 99% identical to the final standard can be read online.
- Dinkum C Library Reference
https://developer.blackberry.com/native/reference/com.qnx.doc.dinkum/topic/bookset.html
A complete C-Library reference online, also available in printed form as book. Quick and reliable information for people with online access.
- Steve Summit's Home Page
This is one of the most important collections for C novices as it contains the FAQ to the newsgroup comp.lang.c which answers lots of beginners' as well as experts' questions.
- Programming in C
This page was elected as the most useful page on C by the comp.lang.c subscribers. It contains links to standard literature and specifications.
- C - Free computer books
http://www.computer-books.us/c.php
Links to computer books available for free in the Internet.
mathtools.net
Plenty of links to resources on Matlab, C and other programming languages.
18. Tools and Resources2
C development tools
- a C cross-reference generator cflow, cxref, calls, cscope, xscope, or ixfw
- a C beautifier/pretty-printer cb, indent, GNU indent, or vgrind
- a revision control or configuration management tool CVS, RCS, or SCCS
- a C source obfuscator (shrouder) obfus, shroud, or opqcp
- a ``make'' dependency generator makedepend, or try cc -M or cpp -M
- tools to compute code metrics ccount, Metre, lcount, or csize; there is also a package sold by McCabe and Associates
- a C lines-of-source counter this can be done very crudely with the standard Unix utility wc, and somewhat better with grep -c ";"
- a C declaration aid (cdecl) check volume 14 of comp.sources.unix (see question 18.16) and K&R2
- a prototype generator see question 11.31
- a tool to track down malloc problems see question 18.2
- a ``selective'' C preprocessor see question 10.18
- language translation tools see questions 11.31 and 20.26
- C verifiers (lint) see question 18.7
- a C compiler! see question 18.3
track down malloc problems tools
one popular one is Conor P. Cahill's ``dbmalloc'', posted to comp.sources.misc in 1992, volume 32. Others are ``leak'', available in volume 27 of the comp.sources.unix archives; JMalloc.c and JMalloc.h in the ``Snippets'' collection; MEMDEBUG from ftp.crpht.lu in pub/sources/memdebug ; and Electric Fence.
C tutorials
- Tom Torfs has a nice tutorial at http://cprog.tomsweb.net.
- ``Notes for C programmers,'' by Christopher Sawtell, are available by ftp from svr-ftp.eng.cam.ac.uk and garbo.uwasa.fi, or on the web at www.fi.uib.no .
- Tim Love's ``C for Programmers'' is available by ftp from svr-ftp.eng.cam.ac.uk in the misc directory. An html version is at http://www-h.eng.cam.ac.uk/help/tpl/languages/C/teaching_C/teaching_C.html.
- The Coronado Enterprises C tutorials are available on Simtel mirrors in pub/msdos/c or on the web at http://www.coronadoenterprises.com/tutorials/c/index.html.
- There is a web-based course by Steve Holmes at http://www.strath.ac.uk/IT/Docs/Ccourse/.
- Martin Brown has C course material on the web at http://www-isis.ecs.soton.ac.uk/computing/c/Welcome.html.
- On some Unix machines you can try typing ``learn c'' at the shell prompt (but the lessons may be quite dated).
- Finally, the author of this FAQ list once taught a couple of C classes and has placed their notes on the web; they are at http://www.eskimo.com/~scs/cclass/cclass.html.
- Several of these tutorials, plus a great deal of other information about C, are accessible via the web at http://www.quut.com/c/.
- Vinit Carpenter maintains a list of resources for learning C and C++; it is posted to comp.lang.c and comp.lang.c++, and archived where this FAQ list is (see question 20.40), or on the web at http://www.cyberdiem.com/vin/learn.html.
- a list: http://www.cyberdiem.com/vin/tutorials/
some good code examples to study
Numerical Recipes
The GNU C Library (glibc)
parse and evaluate expressions(packages are ``defunc,'')
available from sunsite.unc.edu in pub/packages/development/libraries/defunc-1.3.tar.Z
Ian Hay's recommended book list3
GENERAL INTRODUCTION/TUTORIAL:
- For real beginners looking for a solid introduction:
C Programming: A Modern Approach. K.N.King. W.W.Norton & Company, 1996. ISBN 0-393-96945-2
- For somewhat more experienced users looking for a solid introduction:
The C Programming Language, 2nd Ed. Kernigan & Ritchie. Prentice Hall, 1988. ISBN 0-13-110362-8
- Other recommended introductory books:
C: How to Program, 2nd Ed. Deitel, H.M. & Deitel, P.J. Prentice Hall, 1994. ISBN: 0-13-226119-7
REFERENCES:
C : A Reference Manual, 4th Ed. Harbison & Steele. Prentice Hall, 1995. ISBN 0-13-326224-3
The Standard C Library. P.J.Plauger. Prentice Hall, 1992. ISBN 0-13-131509-9
C Programming FAQs Steve Summit Addison-Wesley, 1996. ISBN 0-201-84519-9
ADVANCED TOPICS / FUTHER EXPLORATION:
C Traps and Pitfalls. Andrew Koenig. Addison-Wesley, 1989. ISBN 0-201-17928-8
Expert C Programming: Deep C Secrets Peter Van Der Linden Prentice Hall, 1994. ISBN 0-13-177429-8
Practical C Programming. Steve Oualline. O'Reilly & Associates, 1993. ISBN 1-56592-035-X
Problem Solving And Program Design In C, 2nd Ed. Hanly & Koffman. Addison-Wesley, 1996. ISBN 0-201-59063-8
Algorithms in C, 3rd Ed. Robert Sedgewick Addison-Wesley, 1998. ISBN 0-201-31452-5
code fragments and examples
Bob Stout's popular ``SNIPPETS'' collection is available from ftp.brokersys.com in directory pub/snippets or on the web at http://www.brokersys.com/snippets/.
Lars Wirzenius's ``publib'' library is available from ftp.funet.fi in directory pub/languages/C/Publib/.
Standards and Style
C Style: Standards and Guidelines
http://syque.com/cstyle/preface.htm
针对c的写作风格,分文别类的总结了一些点。可以一读。更好的编程风格进一步阅读《Code complete》