LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Need some direction on where to begin C programming (https://www.linuxquestions.org/questions/programming-9/need-some-direction-on-where-to-begin-c-programming-4175487571/)

SimonPalmieri 12-11-2013 02:15 AM

Need some direction on where to begin C programming
 
Hello everybody, this may be a pretty vague questions but here goes. I'd like to learn C to write Linux programs (with user interfaces) but I'm not quite sure where to start. My goal would be to create my own programs that aren't strictly command line tools (I have experience in languages such as Perl and bash). I've practiced a bit with C but a lot of stuff I seem to find is how to make simple programs that one would run from the command line. I'd like to learn how to take that and go to the next level if you know what I mean. If anyone could offer some advice (books, etc.) on where to start it would be greatly appreciated.

Thanks,

Simon

gdejonge 12-11-2013 04:47 AM

First you need to learn the basic syntax for the C language.

The Kernighan&Ritchie 2nd edition book is still one of the best to learn from. Although googling for "C language introduction" or "C language tutorial" will also give a lot of options. The cprogramming site has a lot of good tutorials.

Next is to learn what basic functions are supported through the standard C library


After that you might want to look into some of the more advanced libraries and how to use them.

If you want to go for graphical programming you might want to look into the qt/gtk frameworks.

Cheers

Spect73 12-11-2013 11:55 AM

I'll second what gdejonge said.

I'm just starting to try out gtk myself. Some useful links for learning that:

http://www.gtk.org
http://zetcode.com/tutorials/gtktutorial

Good luck on your journey.

dugan 12-11-2013 12:24 PM

Quote:

Originally Posted by gdejonge (Post 5078873)
If you want to go for graphical programming you might want to look into the qt/gtk frameworks.

Qt is C++.

timl 12-11-2013 04:23 PM

I had a specific networking problem and this was helpful http://beej.us/guide/bgnet/output/ht...age/bgnet.html

The good thing about this is that he gives you some examples of firing messages between computers with sample programs. Not much use from a graphical perspective though :(

Shadow_7 12-11-2013 04:52 PM

https://developer.gnome.org/gtk3/3.0...g-started.html

C is a lot like a lot of other languages. Stare at the code long enough and you'll get it eventually. The kernel has a lot of non-gui C code to stare at. The above guide for gtk3 which might be mildly more useful for learning over Qt and friends.

Rusakov 12-12-2013 06:33 AM

Try this book.

http://www.apress.com/9781430248811

kooru 12-13-2013 01:40 AM

Quote:

Originally Posted by gdejonge (Post 5078873)
The Kernighan&Ritchie 2nd edition book is still one of the best to learn from.

It is sure one of the best.
But for someone could be too hard to read.

ismailrais 12-13-2013 07:23 PM

I learn every thing from w3schools.com you can visit there and learn how to start c+ program. using of it you can get latest version of your subject without cash. thousand of the student study here and got benefits.


All times are GMT -5. The time now is 01:30 AM.