I have a problem with printf width modifier in C
Example:
char a[] = "o", b[] = "l";
printf("%-3s %s", a, b);
console output gives me 3 spaces between lines, but when I change "o" to "-", the console shows 2 spaces between them. Every time I use the symbol "ł", "ó", "ś" in a string, the width modifier is reduced by 1 character, why is this happening?
OS X 10.11 (El Captain)
source
share