Answer the question
In order to leave comments, you need to log in
How to use printf in C to print a unique character like a cent sign or a paragraph sign?
What code do you need to know? HEX, unicode?printf("§");
Answer the question
In order to leave comments, you need to log in
A HEX code is a character number in Unicode or some other encoding, in the console ASCII encoding.
You need to know the code in ASCII (many characters are NOT there).
And you can withdraw through \.
will print the percentage.
First, you need to make sure that the console you are working with supports such characters. Here we have a question about this (specifically about Windows; as far as I know, Unixes have plain UTF-8).
How to print Σ(sigma) sign in C++(console application)?
To print this character, you must ...
• or use the "wide" versions of the function (wprintf, wcout, etc.).
• or output this character in UTF-8 encoding.
Source text…
• either keep in UTF-8 and the character in it is in clear text;
• or specify a character in it with UTF-16 encoding for "wide" functions, UTF-8 encoding for "narrow" functions.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question