The Anonix Project (126, permasaged)

63 Name: HAHAHaruhi!6mHaRuhies : 2008-05-19 01:16 ID:apPW4NZm

>>62

# cat loltest.c
#include <math.h>
#include <stdio.h>
#include <inttypes.h>
main(int argc, char **argv) {
printf("%.0Lf\n",floorl(sqrtl((long double)strtoimax(argv[1], NULL, 0))));
}
# gcc -o loltest -s -Os -lm loltest.c
# gcc --version
gcc (GCC) 4.0.3
...

>>61
It doesn't matter, the code itself is valid C89 and I happen to have C99 libs to link against. If you want it to work on your system then tell me what your type sizes are. And as for main() not returning int, see section 5.1.2.2.3 of the C99 std. "If the return type is not compatible with int, the termination status returned to the host environment is unspecified" -- that's fine, since >>52 didn't say anything about what it should return.

>>52, why don't you show us what you'd write? And as an extra challenge, write fold as per http://www.opengroup.org/onlinepubs/009695399/utilities/fold.html but ignore everything related to internationalisation.

Name: Link:
Leave these fields empty (spam trap):
More options...
Verification: