Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I would make "is_prime" a private method in the class rather than public C method.
I think I just died a little bit inside seing all of these "magic numbers" :)
You're correct, my mistake (learned something new :) ).
A more detailed explaintation:
https://stackoverflow.com/a/2215454/2351476
How this was accepted? You're obviously writing more than 3 bytes with the sprintf (in fact you need AT LEAST 5 chars, including the '\0' in the end). Also never assume char == 1 byte. You should use sizeof(char).
Looks like you're trying to apply for "The International Obfuscated C Code Contest" (look it up if you don't know what it is).
No offense :)