I was working on this program and I noticed that using %f for a double and %d for a float gives me something completely different. Anybody knows why this happens?
int main ()
{
float a = 1F;
double b = 1;
printf("float =%d
double= %f", a, b);
}
This is the output
float = -1610612736
double = 190359837192766135921612671364749893774625551025007120912096639276776057269784974988808792093423962875123204096.0000
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…