tags:

views:

431

answers:

4

I've been working in C# for a while now (about 2 years). I started out programming in C++ but just learned about pointers/classes/etc..., then moved to C#. I've always wanted to learn C but thought it was too much of a challenge for what people were telling me was an almost dead language. I'm a Linux user (GNOME) and want to make some GTK+ apps. I've been using Vala, which is a language that has syntax like C# but compiles to C then to binary. Now I think I want to learn C, so...

What are some good resources (tutorials, books, etc...) for learning C and GTK+. Please give examples.

EDIT: I actually know how to program in C++ (I used Qt for about 2 months). I'm asking how to learn C. I also already understand OOP (Thanks to C++/C#).


Some relevant previous discussions:

+1  A: 

cprogramming.com has a nice tutorial.

Have you considered learning C++ instead?

Please see my related answer here: Is it true that there is no need to learn C because C++ contains everything?

Brian R. Bondy
+2  A: 

I am a big fan of Marshall's "UNIX System Calls and Subroutines using C. " online tutorial. It assumes that you are already a developer, so it really covers C, and then gets into a lot of the useful UNIX stuff.

Uri
I gotta give it to you, this is exactly what I was looking for!
Lucas McCoy
Enjoy. Just be careful to see how POSIX changed and what things are Linux specific. This is more old style UNIX.
Uri
+2  A: 

Joel likes K&R C.

Many years ago I taught myself to program using good old K&R C. It's an amazing book.

David Norman
+1  A: 

I would agree with Brian (recommend learning C++ first, that is), but for slightly different reasons. I remember writing my first C++ application using MFC 1.0 in the early 90's, after writing Win32 apps in C for a few years. This was a major shift of how to architect applications, and I would recommend that you don't put yourself in the same place.

If you learn C++ first, you will not train yourself to think "procedurally". You will learn most of the syntax elements of C, and you will probably not want to use it.

cdonner