Learning to program in c

Hi,

I'v been fiddling with c programming for several years, and would say that i have a firm grip on the language(syntax etc). My problem is that i don't know how to USE c. I'v never made any "big" programs or worked on any kind of projects, just simple test programs. I'm wondering if anybody could suggest some simple program of some sort that would give me some challange, but that isn't to hard complete. I'v tried several times, but I usually give up after a while, because it get's to complicated.

What i'm asking is if somebody could suggest a simple first project. What was the first program you guys made?

thanks =)

-John

You might try writing a simple shell (command line interpreter).
Start with the basics...
read line input
execute the request

...then add more functionality
parse "special" characters in the line input
(i.e. I/O redirection)

add built-ins
etc, etc...

The first C program I wrote was a UNIX networking client-server application using sockets. Personally, I think that network programming teaches the true Zen of UNIX and highly recommend it. My first UNIX spiritual guide book: UNIX Network Programming, by Richard Stevens.

I know just what you mean!

Here are some ideas for you

  1. Video shop database/booking system.

    ** A database can be just a bunch of flat text files.

  2. Sorting routines.

    ** Try to write a sort routine that can handle any size of file.
    Use temporary files to store intermediate results.

  3. Experiment with simple screen displays.

    e.g. write a menu program that use (by file or command line) a list of options and will return the selected option.

  4. A mail merge program.

  5. Try to emulate some Unix commands e.g. grep, ls, find

  6. If you can manipulate graphics try writing a program that generates a tiled map of terrain.

    ** Try to make the map a realistic a possible. Keep it in as small amount of memory as possible. Allow the user to scroll about the map using cursor keys.

These are just a few ideas of the top of my head. I promise you that at when I was learning how to program I have written these programs for myself.

It is good that you are willing to take on programming. Remember the only way to get good is to pratice.

Regards

MBB

I've encountered slightly the same problem recently. They've suggested to visit www.sourceforge.net. Go there join projects you like. There are lots of real prog gurus who really help. You do everything for free but you get nice real life experience insead.

You might wanna create a project yourself at www.freshmeat.net ask people to join your project and help you. Checkout all the Open Source Developers Network www.osdn.com. It's pretty helpful stuff for developing your practical skills.

Good luck
Regards
:smiley: