开发者

C Problems and Solutions [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
开发者_开发知识库

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 7 years ago.

Improve this question

I'm looking for a series of C problems (with solutions) that I can use to build my C skills. I already understand the basics of the language, the syntax, and the semantics. I am looking for a series of problems that will help me hone my skills, not a set of simple questions that you'd see in an introductory programming class.


You might try solving some of the problems on Project Euler. The first few are pretty simple, but they get very challenging very quickly. I think it's a lot of fun trying to come up with the shortest code or highly optimized code to compute the results (though, I generally use C++ or Python, not C).

One advantage the Project Euler problems have is that they aren't just language-centric; they're problems that really make you think hard about how to develop an elegant solution to difficult problems.


And don't forget code-golf.

You probably want to respond only to challenges (questions) that have at least 10 upvotes.


Here is a list of sites with online judges (and similar) which contains a large variety of problems:

(The sites are sorted in lexicographical order)

  1. ACM Live Archive, problems from past ACM/ICPC regionals and World Finals.

  2. Arbiter, online judge at Sharif University in Iran.

  3. FZU Online Judge

  4. Google Code Jam

  5. Harbin Online Judge

  6. Hangzhou Dianzi University (HDU) Online Judge

  7. Hunan University ACM/ICPC Online Judge

  8. IPSC (Internet Problem Solving Contest)

  9. KSRU Online Judge

10.Jilin Online Judge

11.Lviv Online Judge

12.Moscow Online Judge

13.National Taiwan University Online Judge

14.Online Problems Solving System (OPSS)

15.Peking University Online Judge

16.Programming Challenges

17.Project Euler

18.Saratov Online Judge

19.Sphere Online Judge

20.TJU Online Judge

21.TopCoder

22.Ural Online Judge

23.USACO Training Program Gateway

24.UVa Online Judge

25.Wuhan University Online Judge

26.ZJU Online Judge

27.Z-Trening


Build libraries that implement sophisticated data structures, like binary trees, dictionaries, and such.


Write a compiler. It doesn't need to be complex or even complete: you can make up a simple language (a subset of lisp?) and then write a lexer for it. Make sure you start by laying down the formal grammar. You will touch memory management, pointer arithmetics and other neat C stuff.

I learnt a great deal about automata and compiler-design by writing a simple YAML parser in C++.


Try out Dennis Ritchie's book on C programming language. The book has quite good problems and also reading it is a joy :) For more challenging problems you can go to Bitwise Programming contest


Ruby Quiz has 156 problems with solutions. But in Ruby, not C. See the ruby-lang mailing list for more after James stopped being Ruby quiz master.


Knuth's repository of bitwise stuff might help in the noble pursuit :)

http://www-cs-faculty.stanford.edu/~knuth/fasc1a.ps.gz


Practice code Katas, language does not matter that much. Trying to solve Katas you allready did with another language is usually quite efficient to learn a new language.


You could always visit Freshmeat, find a few projects that interest you and look at their bug tracker. Grab the code and try to fix a few of the problems.

This helps open source while also helping you to get used to jumping in to someone else's code with debugging goggles on.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜