Getting a weird percent sign in printf output in terminal with C

前端 未结 1 442
北荒
北荒 2020-12-02 14:41

I have this printf statement at the end of my program:

printf(\"%d\", total_candies);

total_candies is an i

相关标签:
1条回答
  • 2020-12-02 15:11

    When (non-null) output from a program doesn't include a trailing newline, zsh adds that color-inverted % to indicate that and moves to the next line before printing the prompt; it's generally more convenient than bash's behavior, just starting the command prompt where the output ended.

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