Learning C in 24 pages
mindrobots
Posts: 6,506
I ran across this little document the other day and thought it put things in an interesting historical perspective and gives a glimpse of C from one of those with the original vision. In light of Ken's blossoming thread about his first program and how to start off learning, I think of this as a little diversion back to our common roots in this great adventure.
From Mr. Brian Kernighan's office at Bell Labs in Murray Hill, NJ, circa 1974, I give you the original internal tutorial on learning this new language C. Everything you need to know to program in C on OS/360, GCOS or UNIX. Now all I need to do is find the "C Reference manual" by some D.M. Ritchie guy written way back in 1974.
Enjoy!
From Mr. Brian Kernighan's office at Bell Labs in Murray Hill, NJ, circa 1974, I give you the original internal tutorial on learning this new language C. Everything you need to know to program in C on OS/360, GCOS or UNIX. Now all I need to do is find the "C Reference manual" by some D.M. Ritchie guy written way back in 1974.
Enjoy!
Comments
To avoid any confusion to beginners it should be pointed out that there are difference between C as presented there and C as it is normally written to modern standards.
A big one being the way the types of function parameters are specified. In that document we see:
Which would more normally be written as:
Nowadays. And C++ does not like the old style at all.
Also that flip function has no return type which will produce a warning on modern compilers.
I should have added a disclaimer about K&R74 C standards versus current C standards.
I just paid 80 bucks for that book didn't know you could get it free. No big deal I like hard copy's anyway easier for me to reference.
Ron
-Tor
Misplaced is generous.
A Chinese educational establishment distributing copyright material - who'd have thunk it?
Sorry, I'm just bitter because I've found my own proprietary documents being shared as teaching aids in .cn land.
-Phil
The "The C Programming Language(ANSI C)" book is written in the same fashion, they share one of the same author's Brian W. Kernighan. I am very happy with the book, even I am understanding it so far.
Ron
Well, at least they both deal with C programming.
BLUSH!
Um, ya that's what I was talking about. Right comment, wrong thread.
This doc is good, but I like your style much better Rick.
Kick me.
--Steve
Agreed on the object lesson writing comments. I'm influenced by this. Great reference.
Peter Prinz is also an author for C in a Nutshell... http://books.google.com/books?id=4Mfe4sAMFUYC&printsec=frontcover&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false
http://www.smorgasbordet.com/pellesc/
Cheers.