When you will go definition of printf. A sample of it..
int printf( . . . )
//va_arg : taking conversion symbol(%d, %f etc) and associated with values
//Case INT_TYPE : Some code for Integer
// Case FLOAT_TYPE : some code for Float
// Case CHAR_TYPE : some code for char
when conversion sybol(%d) and value is double then it's value will be junk. because printf function does not check for type casting. Just %d and its associated values. If it's matching then it will go correct switch case and correct value. Else wrong switch case will execute and value will be junk.