Hi, I'm trying to read a binary file and simply print out the numbers in hex...but it doesn't seem to be working!!! It doesn't seem to be printing anything at all!! PLEASE someone help!!
#include <stdio.h>
#include <stdlib.h>
int main()
{
unsigned long code ;
int num;
int count = 0x00400000;
FILE * input ;
input = fopen("b3-long-sample.bin", "rb");
while( fscanf( input,"%ld", &code) == 1)
{
printf(" %x %08lx\n", count, code);
count +=4;
}
fclose(input);
return 0;
}