Valhalla Legends Archive

Programming => General Programming => Topic started by: Sevatox on February 22, 2003, 02:55 PM

Title: Total newbie to [C]
Post by: Sevatox on February 22, 2003, 02:55 PM
well im just starting to learn, i do have a few books which im reading right now.

all im really asking is: what are some VERY basic programs to start with in C?
Title: Re: Total newbie to [C]
Post by: Yoni on February 22, 2003, 04:03 PM
Try making a hangman game.
Title: Re: Total newbie to [C]
Post by: MrRaza on February 22, 2003, 04:53 PM
Guess the magic number game is always fun.
Title: Re: Total newbie to [C]
Post by: iago on February 22, 2003, 10:51 PM
tic tac toe, ascii graphics.
Very simple text based adventure game.
Title: Re: Total newbie to [C]
Post by: Sevatox on February 23, 2003, 12:44 AM
anything else besides games?  :-X
Title: Re: Total newbie to [C]
Post by: Banana fanna fo fanna on February 23, 2003, 06:30 AM
#include <stdio.h>
int main() {
puts("Hello, world!");
return 0;
}
Title: Re: Total newbie to [C]
Post by: MrRaza on February 23, 2003, 06:40 AM
Try making a very simple calculator.
Title: Re: Total newbie to [C]
Post by: Yoni on February 23, 2003, 08:23 AM
Try making a Battle.net binary bot.

NO WAIT, I mean, how about some basic file programs?
For example try duplicating the "uniq" program from *nix, which removes any duplicate lines from a text file (for more practice, try implementing all its command line options!), and other such similar programs.
Title: Re: Total newbie to [C]
Post by: iago on February 23, 2003, 09:05 AM
Write a spellcheck program, it can use a linear search (ie, just check against every word in the dictionary), and there's plenty of room to improve it later.

Write a program that will find anagrams of a word. Like, if it's given tpos, it will output "pots tops stop opts"  It's not as hard as it sounds, as long as you have a dictionary file.
Title: Re: Total newbie to [C]
Post by: Yoni on February 23, 2003, 09:12 AM
QuoteLike, if it's given tpos, it will output "pots tops stop opts"
That vaguely reminds me of an especially fuzzy topic in MasterMindBot. The "stop" word was especially tricky. :P