printf输出8进制
时间: 2023-09-22 10:13:15 浏览: 159
printf函数可以使用格式控制符"%o"来输出一个整数的八进制表示。例如,如果要输出一个整数变量a的八进制表示,可以使用以下语句:
printf("八进制 --> %o\n", a)。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [printf用法之打印二进制,八进制,十进制,十六进制](https://blog.csdn.net/agkl_hanhan/article/details/123978372)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [printf:实施printf](https://download.csdn.net/download/weixin_42116921/15859954)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文