I did not compile it, but at first glance it suggests that the corresponding line should be:
return hexToDecimal(hex, offset-1, power+1) + hexNum * (int) pow(16,power-1);
Because in your case you call yourself ad infinitum (called using let, let say offset 6, if you pass the offset, it will go through 6 anyway, because it will decrease after it gives the value of the function).
Also, the post-increment will give you undefined behavior to call pow(16,power) later in the same expression, because (again with power = 6 as an example) it could be pow(16,6) or pow(16,7) depending on the compiler.
Everything aside also risks that pow () will give you false (rounded) when converting to int (it might turn out that pow (16,2) returns 255.9999999 and you end up with (int) 255, there is enough evidence there and solutions here in stackoverflow, just find pow).
EDIT (in response to comments):
Finally, introducing the printf magic debugger:
int hexToDecimal(const char *hex, int offset, int power){ if(offset >= 0){ char hexChar = *(hex+offset); int hexNum, recursed; if( isalpha(hexChar) ) { hexChar = toupper(hexChar); hexNum = hexChar - asciiCharOffset; } else { hexNum = hexChar - asciiIntOffset; } recursed= hexToDecimal(hexNum, offset-1, power+1); printf("%d + %d * %d\n", recursed, hexNum, (int)pow(16,power-1)); return recursed + hexNum * (int)pow(16,power-1); } else { return 0; } }