天天看點

Printf(“%d”)

What’s the output result of the following code snippet?

Printf(“%d”)
Printf(“%d”)

unsigned int + int = unsigned int, so a + b = 4294967282

printf("%d"), print as signed, so -14( = 4294967282 as unsigned)

printf(“%u”), print as unsigned int

本文轉自zdd部落格園部落格,原文連結:http://www.cnblogs.com/graphics/archive/2010/04/20/1715865.html,如需轉載請自行聯系原作者

繼續閱讀