+ 1

Can any body tell me why i can't get the output by putting special character in printf instead of emojis

https://code.sololearn.com/c0HLZu271498/?ref=app

18th Jun 2023, 8:02 AM
Harshita Tyagi
Harshita Tyagi - avatar
7 Answers
+ 5
Emoji takes 2 characters space. But # or & takes single character width so add space before or after single character. Then check output..
18th Jun 2023, 3:27 PM
Jayakrishna 🇼🇳
+ 3
Harshita Tyagi it is working. I replaced emoji with special characters as you say and it worked. Explain your problem in it đŸ€”
18th Jun 2023, 8:58 AM
Hasnain [ACTIVE CHALLENGER]
Hasnain [ACTIVE CHALLENGER] - avatar
+ 2
The code you attached, runs correctly. Please explain further what you are trying to do. What is not working? Which special character were you trying?
18th Jun 2023, 8:32 AM
Tibor Santa
Tibor Santa - avatar
+ 2
The code playground on mobile is using a monospace font. This means that most of the basic characters, letters, whitespace, special chars have the same width in pixels. Similar to how it appears in the code editor, the letters are aligned nicely exactly below one another. Same as how a mechanical typewriter would type them. You cannot shift a line by half a character. The emoji is irregular because it is wider than a normal letter, that's why it gives the diamond like effect.
19th Jun 2023, 2:34 AM
Tibor Santa
Tibor Santa - avatar
+ 1
Like if put & or # in the place of emoji then the output is not coming
18th Jun 2023, 8:42 AM
Harshita Tyagi
Harshita Tyagi - avatar
+ 1
Hasnain [ACTIVE CHALLENGER] I am getting output like this # ## ### #### ### ## # I want it like this # ## ### #### ### ## #
18th Jun 2023, 9:54 AM
Harshita Tyagi
Harshita Tyagi - avatar
+ 1
Thanks for the suggestions
19th Jun 2023, 1:26 AM
Harshita Tyagi
Harshita Tyagi - avatar