process of learning C language

S

somenath

Hi All,

I have some questions about the process of learning C language.

I see in this groups all expert most of the time quote from C
standard.

1) My question is do all of you study the C standard as the part of
your learning C language?
2) Is it very much required to study line by line of the C standard to
gain expertise?

I am trying to learn C language by studying K&R book thoroughly,
daily reading this news group and I write code in C as part of daily
work but I don't need to use most of the features of C for example bit
wise operator. But I am passionate about gaining expertise in C
language.
So could you please tell me if I am in correct direction or I need to
put extra effort?

Regards,
Somenath
 
U

user923005

Hi All,

I have some questions about the process of learning C language.

I see in this groups all expert most of the time quote from C
standard.

1) My question is do all of you study the C standard as the part of
your learning C language?

Only if you want the right answers.
2) Is it very much required to study line by line of the C standard to
gain expertise?

No. But you will have to study the part that you do not understand
clearly if you want to know what the C language is supposed to do.

Very few people will just pick up the C standard and read it. But if
you use it for answering questions eventually you will understand the
whole thing.
I am trying to learn C language by studying K&R book thoroughly,
daily reading this news group and I write code in C as part of daily
work but I don't need to use most of the features of C for example bit
wise operator. But I am passionate about gaining expertise in C
language.
So could you please tell me if I am in correct direction or I need to
put extra effort?

I think you have chosen a good course of action.

I suggest the following:
1. Read the C FAQ. You won't understand most of it, but it will help
to get an idea of what is a good idea and what is a bad idea. You
should also refer back to the C FAQ from time to time. What you hope
to gain most from reading it is to remember where certain types of
questions are posed so when you see those questions you will remember
where to look.
2. Read the book K&R2 as you have planned. As you come to each
exercise, work it out carefully. Set your compiler to the maximum
warning level. At first, it will seem a big pain in the rear, but
after you get used to it you will be glad of all the warnings it gives
because it will save you a lot of time.
 
C

CBFalconer

somenath said:
.... snip ...

I am trying to learn C language by studying K&R book thoroughly,
daily reading this news group and I write code in C as part of
daily work but I don't need to use most of the features of C for
example bit wise operator. But I am passionate about gaining
expertise in C language.

You will do fine with K&R, provided it is K&R2. You can get a
relatively recent approximation to the C standard, such as N869.
For a bzip2 compressed text version try:

<http://cbfalconer.home.att.net/download/n869_txt.bz2>

and then you can join in on the amusing hair splitting that goes on
around here.
 
E

Eric Sosman

somenath said:
Hi All,

I have some questions about the process of learning C language.

I see in this groups all expert most of the time quote from C
standard.

1) My question is do all of you study the C standard as the part of
your learning C language?

The Standard is not a teaching tool; I cannot imagine anyone
trying to learn C by reading the Standard. Trying to do so would
be like trying to learn carpentry by studying building ordinances.
2) Is it very much required to study line by line of the C standard to
gain expertise?

The carpenter mentioned above will do a lot of sawing and
hammering without ever consulting the ordinances; his skills and
experience serve him well. But on rare occasions he'll need to
refer to the authorities: He's working on a building that will
house a contagious disease laboratory and there are special
requirements for making the windows germ-tight, or he's making
bookshelves for an oxygen-rich environment where certain kinds
of glue must not be used. When he's doing something out of the
ordinary -- or outside his own ordinary experience -- he needs
to check the regulations to be sure he does it right.

In c.l.c. the regulations are read more frequently than in
the ordinary practice of programming in C. This is because the
sample is biased: Questions that appear here are fairly likely
to concern the murky and seldom-visited corners of the language.
Sometimes implementations (or programmers) disagree about what
the proper behavior is in this or that situation; it's then time
to refer to the Law.
I am trying to learn C language by studying K&R book thoroughly,
daily reading this news group and I write code in C as part of daily
work but I don't need to use most of the features of C for example bit
wise operator. But I am passionate about gaining expertise in C
language.
So could you please tell me if I am in correct direction or I need to
put extra effort?

Keep reading good books, keep reading good (and bad) code,
keep writing code: that's how you'll learn. Your knowledge of
C is likely to remain incomplete, but that's all right as long
as you're aware of where your ignorance lies and don't wander
into those areas inadvertently. (Personal example: I have never
used C's complex arithmetic, nor wide characters, nor snprintf(),
so I'm not familiar with them. But I know they exist, and I know
where to learn about them should the need ever arise -- that's
enough to get me by, and I imagine it'll work as well for you.)
 
K

Keith Thompson

CBFalconer said:
You will do fine with K&R, provided it is K&R2. You can get a
relatively recent approximation to the C standard, such as N869.
For a bzip2 compressed text version try:

<http://cbfalconer.home.att.net/download/n869_txt.bz2>

and then you can join in on the amusing hair splitting that goes on
around here.

n869 is a pre-C99 draft. It has the advantage that it's available as
plain text (but some of the formatting, particularly the significant
use of italics, is missing), but there are a few important differences
between it and the actual C99 standard. Don't bother with it unless
having plain text is extremely important to you.

n1256 is the latest draft. It incorporates the official C99 standard
plus the three Technical Corrigenda (TC1, TC2, TC3). It's freely
available in PDF format, which I find to be quite usable given the
proper tools. And most PDF readers can export a document as plain
text, though I haven't bothered to do this with n1256.

http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf

You can also buy the official C99 standard in PDF format from ANSI (I
think it's about $18) or from your national standards body, and the
Technical Corrigenda are available at no charge.
 
D

David Thompson

You will do fine with K&R, provided it is K&R2. You can get a
relatively recent approximation to the C standard, <snip>

In case it wasn't obvious, that abbreviation means the second edition
of the Kernighan & Ritchie book, revised in 1988 to agree (mostly)
with the then-pending ANSI standard that became C89 (and C90). (Or if
you want to be really pedantic, the then-pending drafts which became
the C89 standard.)

Since the revision process wasn't perfect -- nor the publishers and
authors, though the latter at least were (and are) very good -- you
should also get the errata available online, from Ritchie et al's
website: http://cm.bell-labs.com/cm/cs/cbook/index.html
specifically http://cm.bell-labs.com/cm/cs/cbook/2ediffs.html

- formerly david.thompson1 || achar(64) || worldnet.att.net
 

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,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top