[ create a new paste ] login | about

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

slevy1ster - C, pasted on Oct 19:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdio.h>
#include <stdlib.h>
#include <string.h>


int main()
{
  char str[10] = "0x2f";
   char *nptr;
   long ret;
  ret = strtol(str,&nptr,0);
  printf("%ld",ret + 1);

  return 0;
}


Output:
1
48


Create a new paste based on this one


Comments: