i am trying to read from a binary file.
hexcode of the binary:
ff d8 ff d2 44 54 39 02 23 03 05
half the times i get this as teh out put:Code:char buf; fread(buffer,sizeof(char),4,in); buf=buf&0xff; buf=buf&0xff; printf(" %x %x",buf,buf);
rest of teh times :
compiler i am using is dmc;
i want the output to be consistently ff d8 all of the times.what do i need to do for that?