So I have a very simple program that reads the 3 first bytes of a file:
int main(void) { FILE *fd = NULL; int i; unsigned char test = 0; fd = fopen(
Please look at this question Reading bytes from bmp file.
Looks like problem is in the mode of opening it.