[ create a new paste ] login | about

Link: http://codepad.org/nu9L2AED    [ raw code | output | fork ]

C, pasted on Nov 23:
1
2
3
4
5
6
7
8
9
10
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>

int main() {
  assert(sizeof(unsigned long) == 4);
  printf("%ul\n", (unsigned long)strtol("4294967295", NULL, 10));
  printf("%ul\n", (unsigned long)strtoll("4294967295", NULL, 10));
  return 0;
}


Output:
1
2
2147483647l
4294967295l


Create a new paste based on this one


Comments: