%f不会自动的类型转换,所以它就···
7: printf("%f\n", 123);
00401028 push 7Bh ; 这个就是你的数字 123
0040102A push offset string "%f\n" (0042601c)
0040102F call printf (00401090)
00401034 add esp,8
8: printf("%f\n", (double)123);
00401037 push 405EC000h ; 这两个
0040103C push 0 ; 这两个,就是一个double的表示
0040103E push offset string "%f\n" (0042601c)
00401043 call printf (00401090)
00401048 add esp,0Ch
9: printf("%f\n", 123.0);
0040104B push 405EC000h ;这里弄个.0 编译器就认为他是double了
00401050 push 0
00401052 push offset string "%f\n" (0042601c)
00401057 call printf (00401090)
0040105C add esp,0Ch
|