Programming in C Tutorial
Hi guys, i've been skipping on and off from books about C Programming. I have K&R but they thins very very algorithmic, to much algorithmic for me. I have a hacker's guide to C programming written by lovepump but it's awfully incomplete. I really want to learn C, but the problem is I cant take any courses since nothing is available in my area. Any suggestions? All say K&R but they are very very algorithmic, has anyone noticed that?
P.S. What functions should I use to copy a file from my hdd and then rename it? Like a backup program that would take a vimrc and would copy it to a vimrc.back... |
hello ,I am a newbie myself but I will try to help.
I like Herbert Shildt C the complete reference or C++ the complete reference. just keep learning and practicing. for renameing files I'm not sure what to use ,try google you could just use a bash script or something. |
|
My first langauge was C, and I taught myself the language using Stephen G. Kochan's book, "Programming in C" . However, I think that's since gone out of print and has now been updated to "Programming in ANSI C" (http://www.amazon.com/gp/product/067...torialmania-20). This book was a godsend for me -- my only background was in the areas of classical piano and French, and I did ALL the exercises (okay, maybe one or two slipped by). Kochan explains things in a very concise, complete, plain-English manner, without being overly technical. (Much to my surprise, I ended up getting a master's in CS and worked at Symantec for four years as a developer. However, I have since then awoken from the narcotic spell of Windoze, and am now completely rejuvenated by linux!)
|
I found the book from O'Reilly "Practical C Programming, Third Edition" an excellent book. Concise and easy to follow explanations with loads of examples. I too have also used Schildt in the past but now prefer the O'Reilly series. Hope this helps
|
The C Book is an excellent resource for learning how to program in C.
|
C course
If you are looking for a C tutorial, you might be interested in about.com. They offer some free tutorials on C/C++ programming. Check it out. Hope this is what you are looking for.
:Pengy: |
The C Book is full of errors sadly. I had to correct a few programs so it would compile.
How do I use the gdb in order to watch line by line of what happens in the program? And I would also like to see it in asm. Is there a way? |
You should know that each language has a purpose, for example to do a backupfile you will probably use a scripting language since C is too complicated for that, you should really use shell or perl or python. For example this is a little python funtion a made for that. it will create N backups, instead of overwritting the last backup.
Code:
import shutil Anyway in C, pure C, you will need to read the file pointer, create a second file pointer, copy everything in it and to the other file then close both. here is a link to some funtions. http://gd.tuwien.ac.at/languages/c/p...rown/c_075.htm And in C it it's cross platform :) that's why my script is in python hope that help. |
Quote:
|
funny enough i am using K&R, i am on 1.9 character arrays , ive done some of the excises in the book like reversing the order of the temperture chart.
i am hopeing its just a matter of practise with experimentation, looking at loads of source of programs that interest you. To program well in c takes years of learning |
Quote:
Deitel/Deitel C/C++ is a very good book. It's plenty of exercises. |
I can recommend this http://www.amazon.com/exec/obidos/tg...36739?v=glance
for learning C. Plenty of fully explained examples. 4 1/2 stars avg over 54 reviews... |
O'Reilly e-books
I just downloaded a package of O'Reilly's ebooks by bittorrent. There are a couple about C programming. I'm also interested in getting to it and Perl too.
Can get the .torrent here |
"To program well may take time, but C isn't really a hard language to learn. "
sorry, i should of meant to programme in c something ie, kernal, computer game , fily systems etc.. From wikipedia about Linus Torvalds "His interest in computers began with a Commodore VIC-20. After the VIC-20 he purchased a Sinclair QL which he modified extensively, especially its operating system. He programmed an assembler and a text editor for the QL, as well as a few games. " I can imagine this was done over a few years, thats what i am really getting at when i mean its hard to program in c. Minix has been mentioned as a influence to him... |
All times are GMT -5. The time now is 08:25 AM. |