开发者

Format Specifier for Tall letter output in hexadecimal

开发者 https://www.devze.com 2023-03-30 04:37 出处:网络
When I want to print a hexadecimal value of an integer using printf in C, I use the following statement : printf (\"\\n X = 0x%x \\n\",x); Here I assume the following declaration : int x = -1

When I want to print a hexadecimal value of an integer using printf in C, I use the following statement : printf ("\n X = 0x%x \n",x); Here I assume the following declaration : int x = -1

Now this prints Oxffffffff. I would like to see the output as 0xFFFFFFFF (all Tall Letters). Which format specifie开发者_如何学编程r will help me achieve that?


printf ("\n X = 0x%X \n",x);

0

精彩评论

暂无评论...
验证码 换一张
取 消