[plt-scheme] [OT] Making the transition from Java to C

From: Amit Saha (lists.amitsaha at gmail.com)
Date: Thu Sep 24 05:40:42 EDT 2009

Hello,

Andrei Estioco wrote:
> Hello. Can anyone suggest a good (and hopefully, free online) guide for
> someone with Java experience wanting to learn C? I am currently reading The
> C Programming Language by Kernighan and Ritchie. However, I find that the
> first few chapters are wasting my time as they are mostly concerned with
> syntax issues--something I can easily adapt to given my experience in Java.
> On the other hand, I do not want to skip chapters as I might miss some
> important points.

Coming from Java, the biggest difference and perhaps the most annoying 
nuance you will find is when you start to do some serious programming, 
i.e using pointers :) . You will often be greeted with a SIGSEGV and you 
will need to pick up some new tools, like the GNU debugger (gdb) to help 
you get out of those. Whereas its highly intellectually simulating, you 
will discover to your displeasure that sometimes, you will need to spend 
more time debugging your SIGSEGV, than you used to create them :)

The best way, to read up through K&R (a classic) and not get bored is 
perhaps to type in and try out some of the simple C-programs, like the 
Calculator, etc to get familiar with "switch-case" and other constructs. 
Then, IIRC you have a program to take various command-line switches & 
options. So you will learn to some extents someways of how Unix programs 
work.

HTH,
Amit
-- 
Journal: http://amitksaha.wordpress.com
µ-blog: http://twitter.com/amitsaha
IRC: cornucopic on #scheme, #lisp, #math, #linux


Posted on the users mailing list.