Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Interesting project to learn C? [closed]

Tags:

c

project

I have some basic knowledge of C (and a bit more of C++). I got a copy of K&R, and I want to use it to help me dig deeper into the language. What is a good idea that will involve using most of C's features and standard library? Also, what important differences between C89 and C99 should I be aware of?

EDIT: Forgot to mention, this should be mostly doable for a beginner. I'm not asking for a programming tutorial; rather, something mid-scale. I understand that OS stuff is one of C's main purposes, but wouldn't that be too complicated?

Also, reading and answering questions is always a good idea, but I want to get some actual practice, make a program that will do stuff.

like image 458
Javier Avatar asked Aug 10 '09 21:08

Javier


People also ask

How can I make a project in C?

From the menu bar, click File > New > Project. In the Select a wizard window, expand C/C++, select C++ Project, and then click Next. In the Create a C++ Project window, in the Project name field, enter a name for the C++ project. From the Project type list, select Makefile Project/Empty Project, and then click Finish.


1 Answers

Implement a programming language. This doesn't have to be terribly hard - I did the language that must not be named - but it will force you to learn a lot of the important parts of C. If you don't want to write a lexer and/or parser yourself, you can use lex/flex and yacc/bison, but if you plan on that you might want to start with a somewhat smaller project.

Take some program you have in a higher-level language and rewrite it. If you have a Perl/Python/Ruby/Bash script that you use a lot, and you notice a lag time while it runs, rewrite it in C with a focus on performance.

It's my opinion, however, that if you're writing a program to learn C, it's better to reinvent the wheel. Programming in C is all about making and adjusting the wheel, and if you only learn C by using libraries that abstract away the wheel for you, well, you're really not learning C. It may be faster - and when you're working on a real project in C, by all means, don't reinvent the wheel - but if you're doing this to learn, then by all means, learn how the wheel works.

like image 128
Chris Lutz Avatar answered Sep 21 '22 15:09

Chris Lutz