# Any good programming challenge using the c language.

1. Oct 29, 2005

### kant

I am currently in my second quarter learning the c language. The class is not hard at all, but i want some challenge problems. Are there any goods links?

2. Oct 30, 2005

### Tide

How about writing some extended (or infinite) precision numerical routines so you can calculate things like 10,000! etc.?

3. Oct 30, 2005

### kant

What do you mean by "precision numerical routines"? You have to be more specific.

4. Oct 30, 2005

### dpm

He means represent your number as a string of characters and then write some routines to compute with the numbers. C's built in numerical types have a limited range, but if you write your own "big number" routines, the range is potentially infinite (given enough memory, of course).

5. Oct 30, 2005

### dduardo

Staff Emeritus
There are loads of problems you can find here:

http://acm.uva.es/problemset/ [Broken]

Last edited by a moderator: May 2, 2017
6. Oct 30, 2005

### ComputerGeek

How about figuring out how to write an algorithm for an NP problem that completes in O(log n)

just kidding.

7. Oct 30, 2005

### Hurkyl

Staff Emeritus
Searching a sorted list is an NP problem that has a solution that runs in O(log n) time. (Assuming a random access lookup counts as one unit of work)

(Yes, I know you meant NP-complete. :tongue:)

8. Oct 30, 2005

### kant

Last edited by a moderator: May 2, 2017
9. Oct 30, 2005

### ComputerGeek

Yes :-) I thought about it after but was to lazy to change it.

10. Nov 6, 2005

### ceptimus

Solving puzzles where you have to arrange things is a good one. Normally recursion (where a function calls itself) is a good way to tackle these.

A pentomino solver is interesting. You'll find lots of these on the web, but to make it interesting, just read up on the problem and then write your own code.

11. Nov 6, 2005

### neurocomp2003

build a 3D engine.

12. Nov 8, 2005

### saltydog

Some of my favorites:

1. A neural network which displays a small window allowing you to use the mouse to "draw" a number and then have the network interpret it.

2. A multi-tasking operating system scheduler (just a simulator). The quintessential reference: "A Scheduling Philosophy for Multi-processing Systems", ACM Journal, 60's or so.

3. A Drag-and-drop application which displays a drawing of a dorm, and allows you to drag-and-drop students into the rooms (all database operations updated concurrently).

4. A general-purpose plotting library: Supply a function and it plots a nice report on the screen. Try doing this in 3-D as well. Add features such as point-and-click operations on the graph (enlarging, reducing, etc.).

Last edited: Nov 8, 2005
13. Nov 15, 2005

### olivia_ton

Get into systems side with C, C++