hello i am a bit confused here
all i want to do is open a file and read the first line from it which happens to be a hexidecimal number say C8

it sort of works but the value that is printed is not 200
(which is the decimal equiv. to C8)


int GetValue(FILE* fptr){

int val;
char buff[100];

start = 0;
fgets(buff,95,fptr);
sscanf(buff, "%d", &val);
printf("hex value: %0xd\n", val);
printf*("dec value: %d\n",val);
}

it outputs 10d or 0d
or something else am i not initializing something somewhere?

can someone point to what i am doing wrong here?