Learning C from old books ??

J

Jhon smith

Hi,all,I was just wondering if I am likly to have any problems trying to
learn C from older books,I have some from the late 80`s,mid/late 90`s.
I am using Dev-C++ on the pc windows platform,But I have noticed small
differnces in the books such as,int main(),main(void),fprintf,and
others,just wondering if these older books are still worth trying to learn
from as Im on a very tight budget and can`t really afford any thing else,or
are they just going to be to outdated.
I would ultimately like to learn C then ,maybe C++,then windows,or with my
brain it might be easier Win the lotto!.
Thanks for you help.
 
O

osmium

Jhon smith said:
Hi,all,I was just wondering if I am likly to have any problems trying to
learn C from older books,I have some from the late 80`s,mid/late 90`s.
I am using Dev-C++ on the pc windows platform,But I have noticed small
differnces in the books such as,int main(),main(void),fprintf,and
others,just wondering if these older books are still worth trying to learn
from as Im on a very tight budget and can`t really afford any thing
else,or
are they just going to be to outdated.
I would ultimately like to learn C then ,maybe C++,then windows,or with my
brain it might be easier Win the lotto!.

The copyright date on K&R, 2nd edition, which is pretty much the bible, is
1988. You may just be seeing differences in pedantry.
 
M

Malcolm

Jhon smith said:
Hi,all,I was just wondering if I am likly to have any problems trying to
learn C from older books,I have some from the late 80`s,mid/late 90`s.
I am using Dev-C++ on the pc windows platform,But I have noticed small
differnces in the books such as,int main(),main(void),fprintf,and
others,just wondering if these older books are still worth trying to learn
from as Im on a very tight budget and can`t really afford any thing else,or
are they just going to be to outdated.
I would ultimately like to learn C then ,maybe C++,then windows,or with my
brain it might be easier Win the lotto!.
If you are on a tight budget then using an old second hand book is probably
a reasonable economy. The language is stable enough for differences not to
matter too much.
However the first book I learnt C from (also bought second hand, since I was
on a tight budget at the time) made no distinction between standard library
functions and compiler extensions. Because of this I wasted a lot of time
wondering where the fgetint() function was to go with fgetc(), how to set
the printf() cursor on the screen and suchlike things.

When your lottery money does come through, try to get up to date
documentation however. This is particularly the case if you start on C++,
since the current language looks nothing like it did ten years ago.
 
C

Christian Staudenmayer

Malcolm said:
If you are on a tight budget then using an old second hand book is probably
a reasonable economy. The language is stable enough for differences not to
matter too much.
However the first book I learnt C from (also bought second hand, since I was
on a tight budget at the time) made no distinction between standard library
functions and compiler extensions. Because of this I wasted a lot of time
wondering where the fgetint() function was to go with fgetc(), how to set
the printf() cursor on the screen and suchlike things.

When your lottery money does come through, try to get up to date
documentation however. This is particularly the case if you start on C++,
since the current language looks nothing like it did ten years ago.

You could use that old book to teach you C and then get (for example)
the manual of the GNU C Library [1] as a reference (I think it clearly
denotes functions that are not part of the standard).

Greetings, Chris.

[1] http://www.gnu.org/software/libc/manual/html_node/libc_html_node.tar.gz
 
K

Karthik Kumar

Malcolm said:
If you are on a tight budget then using an old second hand book is probably
a reasonable economy. The language is stable enough for differences not to
matter too much.
However the first book I learnt C from (also bought second hand, since I was
on a tight budget at the time) made no distinction between standard library
functions and compiler extensions. Because of this I wasted a lot of time
wondering where the fgetint() function was to go with fgetc(), how to set
the printf() cursor on the screen and suchlike things.

When your lottery money does come through, try to get up to date
documentation however. This is particularly the case if you start on C++,
since the current language looks nothing like it did ten years ago.

And yeah - try to get the ANSI standard pdf from the ISO web site
then. That would be definitely helpful. It costs $18 ( the same for
both ISO C / C++ standards ).
 
M

Merrill & Michele

"Karthik Kumar"
And yeah - try to get the ANSI standard pdf from the ISO web site
then. That would be definitely helpful. It costs $18 ( the same for
both ISO C / C++ standards ).

If you want to avail your self of any type of real help around here, you
need to meet the decision of whether learning c is worth 40 clams to you.
You MUST have K&R if you are to use this forum for self study. MPJ
 
R

Robert Gamble

"Karthik Kumar"

If you want to avail your self of any type of real help around here, you
need to meet the decision of whether learning c is worth 40 clams to you.
You MUST have K&R if you are to use this forum for self study. MPJ

That is just utter nonsense. While K&R is a very respectable piece of
work, it is by no means required for either learning C or participating in
this group. It does not cover all aspects of the langauge, it has not
been updated for C99 (which is the latest official standard whether people
like it or not), and is written with the assumption that the reader
already has programming experience. It is by no means the "end all, be
all" on the subject and there are many people who would be better off
learning C from another angle, especially those who are learning C as
their first language.

Rob Gamble
 
T

Trent Buck

Quoth Karthik Kumar on or about 2004-11-14:
And yeah - try to get the ANSI standard pdf from the ISO web site
then. That would be definitely helpful. It costs $18 ( the same for
both ISO C / C++ standards ).

I wish to make two important points.

* A C newbie, especially one new to programming in general, will
probably only be confused by the standard.

* The $18 version contains DRM is only readable with Adobe readers[0].
The Standards Australia copy is AUD418.95[1], and presumably doesn't
contain the DRM. I mostly work from a dead-tree photocopy :)

-trent

[0] This is second-hand knowledge, a colleague purchased it.
[1] That's several hundred in US dollars.
 
T

Trent Buck

Quoth Jhon smith on or about 2004-11-14:
Hi,all,I was just wondering if I am likly to have any problems trying to
learn C from older books,I have some from the late 80`s,mid/late 90`s.

A beginner will probably not notice any difference between old books and
the current standard. You can always ask here if you do :)
Try to stay away from pre-ANSI stuff, though.

OT: I strongly recommend you get a UNIX. Learning to program is a lot
harder under Windows. The easiest way to get a UNIX is to ask the
nearest Linux / BSD zealot for help.

-trent
 
B

Ben Pfaff

Trent Buck said:
* The $18 version contains DRM is only readable with Adobe readers[0].

The PDF versions of the C99 and C++98 standards that I obtained
from ANSI both view fine in xpdf and gv. In fact, I don't think
I've ever used them with the Adobe-branded reader.
 
T

Trent Buck

Quoth Ben Pfaff on or about 2004-11-14:
* The $18 version contains DRM is only readable with Adobe readers[0].

The PDF versions of the C99 and C++98 standards that I obtained
from ANSI both view fine in xpdf and gv. In fact, I don't think
I've ever used them with the Adobe-branded reader.

Interesting. When and from which site did you get them?

On 2004-09-17 I was told:
| > That's some markup! URL?
| URL not available, due to it all being dynamic; go to http://www.ansi.org,
| click the Downloads link, create yourself an account (this is free), then
| go back to Downloads and search for 9899. You can then nab yourself a
| softcopy for US$18 if you have an Adobe Reader 6.01-compliant eBook reader.

Later the same day:
| Trent, on the off-chance you've got a credit card, don't bother -- it
| appears to be infested with poxy Windows-reliant DRM such that it will
| only open in Adobe Reader 6.0+. The standard is only a 1.4M download, but
| the reader is 15M. And I'm on dialup. What a pain.

-trent
 
B

Ben Pfaff

Trent Buck said:
Quoth Ben Pfaff on or about 2004-11-14:
* The $18 version contains DRM is only readable with Adobe readers[0].

The PDF versions of the C99 and C++98 standards that I obtained
from ANSI both view fine in xpdf and gv. In fact, I don't think
I've ever used them with the Adobe-branded reader.

Interesting. When and from which site did you get them?

webstore.ansi.org, and late 1999 or early 2000 for C99 and around
2001 for C++98. I suppose the situation could have changed since
then.
 
F

Flash Gordon

Quoth Jhon smith on or about 2004-11-14:

A beginner will probably not notice any difference between old books
and the current standard. You can always ask here if you do :)
Try to stay away from pre-ANSI stuff, though.

Mid-80's books are likely to be pre-ANSI since the ANSI standard came
out in 89

You can generally recognise pre-ANSI stuff by the way functions are
defined.

The pre-ANSI form looks something like
foo(bar,bob)
int *bar;
{
}

The ANSI/ISO equivalent is
int foo(int *bar, int bob)
{
return 0;
}

As you (the OP) can see, the ANSI/ISO version has the variable types
inside the parenthesis. There are other differences as well.
OT: I strongly recommend you get a UNIX. Learning to program is a lot
harder under Windows. The easiest way to get a UNIX is to ask the
nearest Linux / BSD zealot for help.

OT Still: an easier way for a Windows person IMHO, especially one
without a spare machine, is Cygwin from http://www.cygwin.com/ although
you have to make sure you select the development stuff for installation.
 
J

Jhon smith

Thanks to all for your help.


Flash Gordon said:
Mid-80's books are likely to be pre-ANSI since the ANSI standard came
out in 89

You can generally recognise pre-ANSI stuff by the way functions are
defined.

The pre-ANSI form looks something like
foo(bar,bob)
int *bar;
{
}

The ANSI/ISO equivalent is
int foo(int *bar, int bob)
{
return 0;
}

As you (the OP) can see, the ANSI/ISO version has the variable types
inside the parenthesis. There are other differences as well.


OT Still: an easier way for a Windows person IMHO, especially one
without a spare machine, is Cygwin from http://www.cygwin.com/ although
you have to make sure you select the development stuff for installation.
 
S

Spiro Trikaliotis

Hello,

Flash Gordon said:
You can generally recognise pre-ANSI stuff by the way functions are
defined. [...]

As you (the OP) can see, the ANSI/ISO version has the variable types
inside the parenthesis. There are other differences as well.

"Unfortunately", the german version of K&R, 1st ed., already contained
some of the "newer" things (for example, the ANSI way to define function
prototypes, void and void pointer, and the like), which the
translator(s) already included. You see, it is not that easy to
recognize pre-ANSI stuff just by these. :-(

Regards,
Spiro.
 
R

Robert Gamble

Trent Buck said:
Quoth Ben Pfaff on or about 2004-11-14:
* The $18 version contains DRM is only readable with Adobe readers[0].

The PDF versions of the C99 and C++98 standards that I obtained
from ANSI both view fine in xpdf and gv. In fact, I don't think
I've ever used them with the Adobe-branded reader.

Interesting. When and from which site did you get them?

webstore.ansi.org, and late 1999 or early 2000 for C99 and around
2001 for C++98. I suppose the situation could have changed since
then.

My C99 standard purchased from the same place in Jan 2004 works fine with
gv (3.5.8), xpdf (3.00), and Acrobat Reader for Linux (5.08-202) including
bookmarks with the latter two.

Rob Gamble
 
S

Stuart Gerchick

Jhon smith said:
Hi,all,I was just wondering if I am likly to have any problems trying to
learn C from older books,I have some from the late 80`s,mid/late 90`s.
I am using Dev-C++ on the pc windows platform,But I have noticed small
differnces in the books such as,int main(),main(void),fprintf,and
others,just wondering if these older books are still worth trying to learn
from as Im on a very tight budget and can`t really afford any thing else,or
are they just going to be to outdated.
I would ultimately like to learn C then ,maybe C++,then windows,or with my
brain it might be easier Win the lotto!.
Thanks for you help.


There is no need to get the standard. You need a book to help you
out. If you have some prograimming K&Rs book (any ANSI C edition) is
fine.

If you want your hand held a little more, get a copy of "C:How to
Program" by Dietel and Dietel.
 
H

hypz

Robert said:
That is just utter nonsense. While K&R is a very respectable piece of
work, it is by no means required for either learning C or participating in
this group. It does not cover all aspects of the langauge, it has not
been updated for C99 (which is the latest official standard whether people
like it or not), and is written with the assumption that the reader
already has programming experience. It is by no means the "end all, be
all" on the subject and there are many people who would be better off
learning C from another angle, especially those who are learning C as
their first language.

Rob Gamble


Well, I've been studying C for a while and K&R is my first book, it's nice
to learn from, and it's a very good book, with challenging exercises :) I
think its a perfect first book.
 
D

Dave Vandervies

Hi,all,I was just wondering if I am likly to have any problems trying to
learn C from older books,I have some from the late 80`s,mid/late 90`s.

Late '80s probably won't be as helpful as they could be; the standard
defining the language that whatever compiler you're using is likely
to implement was published in 1989, so books before that are probably
working with a language that isn't quite the same as the language you're
trying to learn.

With books from mid/late '90s you shouldn't run into any language
problems, but be aware that there are a lot of bad books out there.
If you can get a good textbook from mid-'90s on, it will probably be
perfectly usable. If you're not sure it's good, go ahead and use it
anyways, but be aware that it might not be perfectly reliable - a good
indicator is to see how often you get corrected in comp.lang.c after
stating things you learned from the book.

I am using Dev-C++ on the pc windows platform,But I have noticed small
differnces in the books such as,int main(),main(void),fprintf,and
others,just wondering if these older books are still worth trying to learn
from as Im on a very tight budget and can`t really afford any thing else,or
are they just going to be to outdated.

They're probably still worth trying to learn from. If you can get your
hands on a copy of K&R2, it's both a good textbook and a useful sanity
check for other ones.

A lot of the differences between books, especially the more recent
ones, will just be style differences; some will reflect the author's
misunderstanding (or just can't-be-bothered-to-learn) of the language;
and some will reflect an "all the world's a <something>" attitude.
Following what we talk about here is a good way to work out which
is which.

I would ultimately like to learn C then ,maybe C++,then windows,or with my
brain it might be easier Win the lotto!.

When the lottery money comes in, look for books with "Kernighan" or
"Plauger" in the author list. Kernighan (the K in K&R) was involved
with a lot of the early development of the language, and Plauger has
written a major implementation of the standard library (as well as a
book about it). Add "Stroustrup" to the list if you're looking for C++
books; he was the primary designer of C++.


dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top