有趣的项目学习C? [英] Interesting project to learn C?

查看:142
本文介绍了有趣的项目学习C?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对C(多种C和一点++)的一些基本知识。我得到了K&放大器的副本; R,我想用它来帮助我更深入地语言。是什么将涉及使用大部分的C'S功能和标准库是个好主意?此外,C89和C99之间有什么重要的区别,我应该知道的?

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?

编辑:忘了提,这应该是一个初学者大多是可行的。我不要求对程序设计教程;相反,一些中等规模。据我所知,OS东西是C的主要目的之一,但是那不是太复杂?

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.

推荐答案

实现的编程语言。这并不一定是非常辛苦 - 我做必须不愿具名的语言 - 但它会迫使你学到了很多C的重要组成部分,如果你不想写一个词法分析器和/或解析器自己,你可以使用的lex / flex和yacc /野牛,但如果你打算在你可能要开始了稍小的项目。

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.

需要一些程序,你有一个更高层次的语言和重写。如果您有使用大量的一个Perl / Python的/红宝石/ Bash脚本,而且你注意到在它运行一个滞后时间,重点对性能改写在C

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.

这是我的观点,但是,如果你正在写一个程序来学习C,最好是推倒重来。在C程序设计是所有关于制定和调整轮,如果你只使用库,抽象掉了轮你学习C,好,你真的不学习C.它可能会更快 - 当你的工作就在C真实的项目,通过各种手段,不推倒重来 - 但如果你这样做是为了学习,然后通过各种手段,学习的车轮是如何工作的。

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.

这篇关于有趣的项目学习C?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆