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

Prolog - Listing -

orchardcms - change base url in local copy in Orchard CMS -

linear regression - Trying to get confidence/prediction intervals with `predict.lm` in R, but I keep getting an error regarding my dichotomous variable -