• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Books for learning C language

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
Do you know any good book for learning the "C Programming Language"?
I found "C Programming Language (2nd Edition) (Prentice Hall Software)", but it seems to me to be a reference more than a learning book.
Thanks.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15448
42
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
C is one of the most used programming languages in the world, so there are thousands of books on programming in C. Amazon lists 4,337 books on C and C++, however most of them seem to be reference manuals.

You can find some free online books here: http://www.freetechbooks.com/forum-3.html

If you Google for "c programming tutorial" you'll also find a number of tutorials.
 
Austin Lee
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want learn c++.
I think < c++ primier> is a nice selection.
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, no.
I want to learn the C language.
What do I need to be installed in my Ubuntu 7.10 to start playing with C?
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any Linux installation should have everything you need already installed.

Kernighan and Ritchie's "The C Programming Language" is a wonderfully readable book; not exactly a tutorial, but far more than a reference. IMO it's the only book you actually need for that language. It's the one I used, many many years ago (actually I used the first edition!)

But as it says above there are thousands of others to choose from.
 
Anand Hariharan
Rancher
Posts: 272
C++ Debian VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by John Todd:
Hi.
Do you know any good book for learning the "C Programming Language"?
I found "C Programming Language (2nd Edition) (Prentice Hall Software)", but it seems to me to be a reference more than a learning book.
Thanks.


If K&R2 was too heavy to start off, consider one of the following two books:

C Programming: A Modern Approach, K.N.King, W.W.Norton & Company, 1996.
ISBN 0-393-96945-2

C: How to Program, 5th Ed. Deitel, H.M. & Deitel, P.J. Prentice Hall, 2007.
ISBN: 0-13-240416-8

One of the banes of C is that, it allows you to make mistakes and may or may not complain about it during runtime. This is known as "undefined behaviour". For this reason, it is important that you learn C from a good resource. Those that can be found on the net are generally not peer-reviewed, and their quality is often questionable.

good luck,
- Anand
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I typed:
apropos compiler
And I got those:
---
ANSI 1989 C compiler
c89
c89-gcc

ANSI 1999 C compiler
c99
c99-gcc

GNU project C and C++
compiler
c++
cc
gcc
g++
---
What is the difference between those funky names? which compiler to use?
Appreciate your time.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll probably just want to use gcc.
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May I ask how they differ?
 
Anand Hariharan
Rancher
Posts: 272
C++ Debian VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This merits a different thread (not related to books for learning C any longer).

First, howsoever similar they may be syntactically, C and C++ are different programming languages. The Gnu Compiler Collection (GCC) provides front-ends for different languages, C and C++ being two of them. Use g++ for compiling C++ and gcc for compiling C.

The C language standard was revised/updated in 1999 with new features. My bet is that both c89-gcc and c99-gcc call gcc under the hood, but (either explicitly or implicitly) making sure that the code being compiled strictly makes use of only those features of one particular language specification.

Like advised earlier, for compiling C programs, just call gcc.

- Anand
 
Nicholas Jordan
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try Ivor Horton to start off with, if you want a well done beginners book that does not short the deeper issues. Any of the dummies books from any local library are a soft landing on the first issues. Next up would be an O'Reilly book, which one being evident from the title. I have found Chapman & Hall to be ideal for field techs. I tried things like K&R and gcc, but gave up on that approach as being mired in historical battles and deeply technical arcade ~ Java being the sensible route out of those issues.

Cay S. Horstmann has a paticularly good intro: Computing Concepts with C++ Essentials, and as well being a Java imprint cover author. You could start with Hello world in gcc using K & R - let us know which approach works for you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic