A89: where can I learn C???


[Prev][Next][Index][Thread]

A89: where can I learn C???




 > hey guys,
 > sorry to bug yall again, but where can I learn to program in C?  

You can buy a C book. If you don't mind intensive learning, you
may find B. Kernigham - D. Ritchie: The C Programming Language, second 
edition ("the" ANSI C book) quite helpful.

 > I heard that C is easier than assembly (maybe that is wrong, so
 > reply and tell me otherwise) and so I'd like to try and learn it.  

C is a higher level language than assembly. As such, it needs less
human input on details therefore it allows the human to spend more
effort on the algorithmic side os the problem. C, however, is lower
level than a lot of other high-level languages and thus allows you
to take care of the details (at least some) if you feel it being
warranted. It is sometimes said that C is a glorified macroassembler.
While this is not true in the literal sense, in spirit it is not that
far off.

 > I also heard that C is kinda like BASIC, but I'm not so sure about 
 > that when I look at the source for some of the C programs out

Well, it is as close to BASIC as it is close to any other procedural
language. C was developed from B, which was developed from BCPL which 
really was a glorified macroassembler. The most important aspect of
C is probably the pointer. Not too many other languages allow you to
deal with explicite memory addresses. Some, like Pascal can allocate
objects from the heap and give you a reference to it. It is a pointer. 
However, the only allowed operation is dereferencing it. In C a
pointer is an object on its own right: a memory address which you can 
explicitely cast to be a reference to any object of your liking, you 
can do arithmetics on it and so on. 
C's syntax is an other issue, it is a very terse language without much 
syntactic sugar. BASIC, as its name indicates (Beginners' All-purpose 
Symbolic Instruction Code) was designed with beginners in mind. This 
usually leads to some syntactical fluff which helps you to understand 
the code. C tries to avoid superfluous syntax and thus understanding C 
is a bit harder until you get used to it.
 
Regards,

Zoltan


References: