Any good programming challenge using the c language.

Click For Summary

Discussion Overview

The discussion revolves around seeking programming challenges for learning the C language, with participants suggesting various types of problems and projects that could enhance skills in programming and algorithm development.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Debate/contested
  • Homework-related
  • Mathematical reasoning

Main Points Raised

  • One participant requests links to programming challenges suitable for someone in their second quarter of learning C.
  • Another suggests writing extended precision numerical routines to calculate large factorials, like 10,000!.
  • A follow-up asks for clarification on what is meant by "precision numerical routines," indicating a need for specificity.
  • It is explained that representing numbers as strings and creating custom routines can allow for calculations beyond the limits of C's built-in types.
  • Links to problem sets are provided, with one participant affirming the usefulness of the suggested link.
  • A humorous suggestion is made about writing an algorithm for an NP problem that completes in O(log n), which is later acknowledged as a misunderstanding of NP-completeness.
  • Participants discuss solving puzzles through recursion, with a specific mention of creating a pentomino solver as an interesting challenge.
  • One participant proposes building a 3D engine as a project idea.
  • Another lists several complex project ideas, including a neural network for interpreting drawn numbers, a multi-tasking operating system scheduler simulator, a drag-and-drop application for managing dorm assignments, and a general-purpose plotting library with interactive features.
  • A suggestion is made to explore the systems side of programming with C and C++.

Areas of Agreement / Disagreement

Participants present a variety of programming challenges and project ideas, but there is no clear consensus on a single best approach or challenge. Multiple competing views and suggestions remain throughout the discussion.

Contextual Notes

Some suggestions involve advanced concepts that may depend on prior knowledge or specific definitions, such as NP problems and recursion techniques. The feasibility of certain projects may also depend on the participant's current skill level and resources.

Who May Find This Useful

Individuals learning the C language, educators seeking challenge problems for students, and programmers looking for project ideas to enhance their skills.

kant
Messages
388
Reaction score
0
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?
 
Technology news on Phys.org
How about writing some extended (or infinite) precision numerical routines so you can calculate things like 10,000! etc.?
 
Tide said:
How about writing some extended (or infinite) precision numerical routines so you can calculate things like 10,000! etc.?

What do you mean by "precision numerical routines"? You have to be more specific.
 
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).
 
There are loads of problems you can find here:

http://acm.uva.es/problemset/
 
Last edited by a moderator:
How about figuring out how to write an algorithm for an NP problem that completes in O(log n)

:-P

just kidding.
 
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. :-p)
 
dduardo said:
There are loads of problems you can find here:

http://acm.uva.es/problemset/


Very nice link. thanks.
 
Last edited by a moderator:
Hurkyl said:
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. :-p)

Yes :-) I thought about it after but was to lazy to change it.
 
  • #10
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
build a 3D engine.
 
  • #12
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:
  • #13
Get into systems side with C, C++
 

Similar threads

Replies
86
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
4
Views
3K
  • · Replies 25 ·
Replies
25
Views
2K
  • · Replies 15 ·
Replies
15
Views
4K
Replies
22
Views
3K
Replies
65
Views
6K
  • · Replies 397 ·
14
Replies
397
Views
22K
  • · Replies 9 ·
Replies
9
Views
2K
Replies
69
Views
11K