/* Low-level i/o sample */
typedef struct Hdr { int x, y; } *Phdr;
char buff[100];
Phdr p;
...
if (fread(buff,1,100,f) >= sizeof(struct Hdr))
{
p = (Phdr)buff;
/* as usually, do nothing (char* bits == p bits)
* char[] implicitly casted to char* then your cast...
* Now the compiler knows that you know what to do...
*/
...
/* Another case (may be you have specifications;) */
int n = 123;
...
printf("%f\n",(double)n); /* as usually, the compiler emits implicit RTL call */