Favorite c programming book?

Status
Not open for further replies.

jbode

Ars Legatus Legionis
11,752
Subscriptor
My favorite C book is C: A Reference Manual by Harbison & Steele. It's not quite what you're looking for (it's exactly what it says it is: a reference manual), but it will make an awesome companion to whatever other book you wind up getting. It's up to date with the latest C standard (C99) and has handy sections on C and C++ compatibility.

Several people are going to recommend The C Programming Language by Kernighan & Ritchie; it's a good book, but it's getting a bit long in the tooth and doesn't cover the C99 standard. However, it's still a good general introduction to the language.

Other than that, no solid recommendation; I've been working in C for a little over 20 years, so I haven't really checked out any introductory books for a long time.

Avoid anything written by Schildt. I realize the latest edition T:TCR is heads and shoulders above the first edition, but the first edition was *so* bad his reputation is still in the negative category AFAIC.
 

MilleniX

Ars Tribunus Angusticlavius
8,138
Subscriptor++
VJK2":3ssl9bun said:
on that note, what's a good c compiler to use in windows vista?
Microsoft has repeatedly said they have no intention of supporting C99, ever, unless a large fraction of the developer world starts screaming at them. That hoard has never materialized. Use a compiler that tracks the standards, like GCC or Clang/LLVM.

Phil
 

Fink_Ployd

Ars Tribunus Militum
2,748
levine":1vfwj547 said:
VJK2":1vfwj547 said:
on that note, what's a good c compiler to use in windows vista?
If you're learning C, the actually-not-kidding best compiler is a virtual machine with Linux installed + commandline tools + gcc. Otherwise, you end up spending half your brain cycles fighting the Microsoft ecosystem.
 

SLR Kid

Ars Tribunus Militum
2,661
levine":37r4jw98 said:
VJK2":37r4jw98 said:
on that note, what's a good c compiler to use in windows vista?
If you're learning C, the actually-not-kidding best compiler is a virtual machine with Linux installed + commandline tools + gcc. Otherwise, you end up spending half your brain cycles fighting the Microsoft ecosystem.

LOL yeah I can't even get hello world to work ATM even though all am doing is copying whats in the book.
 
levine":35744cme said:
VJK2":35744cme said:
on that note, what's a good c compiler to use in windows vista?
If you're learning C, the actually-not-kidding best compiler is a virtual machine with Linux installed + commandline tools + gcc. Otherwise, you end up spending half your brain cycles fighting the Microsoft ecosystem.

That's really good advice. Even if you are Microsoft now it couldn't hurt for the future to see how the command line and Makefiles work.
 

levine

Ars Tribunus Militum
1,986
VJK2":373uyncx said:
So I just installed ubuntu on a 2nd hard disk, and this being a clean install it is so much faster than my bloated vista installation it is not funny.

Anyways...umm, where to find the c compiler on this thing?
It's probably there by default. Open Terminal and do this:
Code:
you@machine:~$ cat << EOF >> hello.c
> #include <stdio.h>
> int main() {
>     printf("hello world!\n");
>     return 0;
> }
> EOF
you@machine:~$ gcc -o hello hello.c
you@machine:~$ ./hello
hello world!
you@machine:~$
If the 'gcc' section fails, you just need to install some stuff:
Code:
you@machine:~$ sudo apt-get install gcc build-essential
Pew pew Linux is easy!! (finger guns)
 
MilleniX":71epwxwh said:
Sadly (from a programmer's perspective), recent Ubuntu releases (don't remember how far back) do not include a compiler in the default installation. It increased disk space requirements, and they felt that most users would not likely need to compile software from source.

Phil

build-essential has been necessary for at least three years, and that's when I started using Ubuntu. I'm not sure they ever provided one by default.
 

zeotherm

Ars Legatus Legionis
10,960
Moderator
VJK2":3qt7v8v4 said:
I'm in business :)

codeblocks is a great app.

thx all.
No offense, but given the above why are you trying to (re)learn C?

If you want to get into programming, there are better (and less trap-filled) options. Not trying to discourage you from learning programming, but you aren't doing yourself any favors. Also, I cannot imagine a single entry level business job that would care about (or even know about) C! ;)
 

jbode

Ars Legatus Legionis
11,752
Subscriptor
zeotherm":3fx0jo8p said:
VJK2":3fx0jo8p said:
I'm in business :)

codeblocks is a great app.

thx all.
No offense, but given the above why are you trying to (re)learn C?

If you want to get into programming, there are better (and less trap-filled) options. Not trying to discourage you from learning programming, but you aren't doing yourself any favors. Also, I cannot imagine a single entry level business job that would care about (or even know about) C! ;)

Yeah, C causes brain damage (I'm a classic case).
 

jbode

Ars Legatus Legionis
11,752
Subscriptor
There's kdevelop, which is a KDE-based knockoff of Visual Studio; haven't used it in years, though, and not sure how well it will work on Ubuntu (which is GNOME-based). I didn't like it personally, but I grew up in the dark ages of 80x24 character dumb terminals, and I'm just plain more comfortable with a command-line environment for C programming (Java's another story; Eclipse may have its faults, but I'd seriously cry if I had to do everything on the command line for Java, even with ant).
 
Status
Not open for further replies.