Has anyone ever attempted writing a complex program on a single line to see if he or she could do it?
Not really complex but meh, it's single line
1 2 3 4
|
int size (char *p)
{
return (*p ? (1 + size(++p)) : 0);
}
|
400 posts whoop whoop
Last edited on
Aha, nice nice, thanks for that
E: Another
1 2 3 4
|
bool isp_2(int num)
{
return (((num-1) & 1) & (!((num - 1) & num)));
}
|
Last edited on