Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C

Name: Anonymous 2009-12-25 13:43

how does one work with larger numbers than 18446744073709551615 in C

Name: Anonymous 2009-12-26 5:53


misaka@kuroko:~$ cat /dev/tty > test.c
#include <stdio.h>

int main() {
 int derp = 18446744073709551615;
 printf("%d\n",derp+1);
 printf("sizeof(int) = %d\n",sizeof(int));
 return 0;
}^D
misaka@kuroko:~$ cc test.c
misaka@kuroko:~$ ./a.out
18446744073709551616
sizeof(int) = 16
misaka@kuroko:~$ uname -a
Anonix kuroko r61ex 2009-12-18 04:47:31 SMP IA64-SSE
misaka@kuroko:~$

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List