#include <stdio.h>
#include <stdlib.h>
#include <math.h>
// Used strtod to extract number from string.
int num_is_int(double d)
{
return d == floor(d);
}
int main(void)
{
const char* tester = "1234-> out";
char** moved; // This is used to store the new location of string.
double result = strtod(tester, moved);
printf("The result is %f,\n the moved string is %s\n", result, *moved);
printf("Result is also int %d\n", num_is_int(result));
return 0;
}