[ create a new paste ] login | about

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

slevy1ster - C, pasted on Sep 3:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include<stdio.h>
#include<stdlib.h>
#include<limits.h>
int main()
{
    char c, *s, *endptr;
    int num;

    s = "0.5";

   num = strtol(s,&endptr,16);
 
    printf("%d - error: %s", num,endptr);
    return 0;
}


Output:
1
0 - error: .5


Create a new paste based on this one


Comments: