0

So I am trying to print out an alphabet with some extended special characters but all I get is warnings and wrong letter warning: multi-character character constant [-Wmultichar]

The array

char letters[30] = {
        'a', 'b', 'c','č','ć', 'd','dž','đ', 'e', 'f', 'g', 'h',
        'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
        'r', 's','š', 't', 'u', 'v', 'w', 'z', 'ž' };

for (i = 0; i < 30; i++)
     printf("%c", letters[i]);

1 Answers1

-1

You aren't going to be able to print out those non-ASCII characters with printf as they are currently formatted. Those don't even appear to be extended ASCII.

To see what characters are printable simply run the code provided in this post ASCII Print Function.

To read more about this you can view this post on printing non-ascii characters: Printing Non-Ascii in c

PatrickOfThings
  • 237
  • 1
  • 9