Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does this program show the four card suits (♠♣♥♦) on all standard-ish systems?

The following shows ♠♣♥♦ on windows xp, will it for all systems??

#include <stdio.h>
int main(int argc, char *argv[])
{
    for (int i = 3; i <= 6; ++i)
        printf("%c", (char)i);

    getchar();
    return 0;
}
like image 233
y2k Avatar asked Jan 23 '10 03:01

y2k


People also ask

What do the 4 card suits represent?

The four suits in playing cards, clubs, diamonds, hearts, and spades, collectively represent the four elements (wind, fire, water, and earth), the seasons, and cardinal directions. They represent the struggle of opposing forces for victory in life.

How do I insert the card suit symbol in Excel?

Insert | Symbols | Symbol and look for the playing card symbols. The quick way is to choose a symbol font then type 2660 into the character code box.


1 Answers

Nope. Character encoding is a very platform dependent, in my experience.

Consider, in ASCII those characters don't even exist. And I have no clue where they are in Unicode. And where ever they are, you would then be depending on how your platform outputs Unicode.

like image 113
GManNickG Avatar answered Nov 15 '22 07:11

GManNickG