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


i have printf statement @ end of program:

printf("%d", total_candies); 

total_candies int, , while expect work correctly, along actual number, i'm getting weird percent sign @ end. enter image description here

can tell me why happening?

when (non-null) output program doesn't include trailing newline, zsh adds color-inverted % indicate , moves next line before printing prompt; it's more convenient bash's behavior, starting command prompt output ended.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -