How to escape the % (percent) sign in C's printf?

前端 未结 13 2875
长发绾君心
长发绾君心 2020-11-22 09:34

How do you escape the % sign when using printf in C?

printf(\"hello\\%\"); /* not like this */
相关标签:
13条回答
  • 2020-11-22 10:37

    use a double %%

    0 讨论(0)
提交回复
热议问题