The Underhanded C Contest Is Back 88
Xcott Craver writes "After several years of inactivity, the Underhanded C contest has returned. The object is to write a short, readable, innocent-looking computer program that nevertheless performs some evil function for reasons that are not obvious under code review. The prize is a $200 gift certificate to ThinkGeek."
The deadline is July 4th, so get to hacking.
actual challenge this year (Score:5, Informative)
No prize then? (Score:2, Informative)
Since ThinkGeek doesn't ship to most countries the prize is almost useless.
Why couldn't they just offer the money?
Re:Here's an idea (Score:5, Informative)
Re:No prize then? (Score:5, Informative)
buggy struct (Score:5, Informative)
Here is the current structure proposed by the organizers for storing the social network.
struct user_struct {
int user_ID;
char * name;
char * account_handle;
int number_of_BFFs;
user * BFF_list;
int scratch;
};
The BFF_list field is supposed to contain the list of friends of a user. The proposed type, user*, suggests that it should be implemented as an array of user. This means that if a user is in your list of friends (stored by value in the array BFF_list), you cannot be in his list of friends unless you both have the same friends. It can only represent non-symetric friendship where each user is involved once in a BFF_list.
I would suggest using type user** for this field.
Re:buggy struct (Score:5, Informative)