That's a hex number, so you have to use 16 as the final arg to your strtol() function. However, I'd guess that this number will never fit into even an unsigned long long (using strtoull), and a test...