#include <stdio.h>
#include <conio.h>
int main () {
char i;
for (i=0;i<=102;i++)
{
printf ("\n%2c %4d",i,i);
}
getch ();
}
//this will print You a ascii hearts and spikes in the begining???and
then the letters
//ofcourse in c language ...
This is because the first 32 ASCII characters are non-printing characters
such as tab, newline, backspace, escape, ... How these are represented
depends greatly on the implementation, the platform, and the platform's
settings. Try running this same C program before and after setting the
KEYB setting on DOS systems (I don't know if it still works on 32 bit
windows systems). You will get very different results.
You can see the complete ASCII table at
http://www.asciitable.com/ Compare
the output from your code above to the table, and you will see that the
first 32 characters come out differently, but after that it should be the
same.
The bottom line is, you can't do what you want in ASCII code. Unicode
might help, but you're still not going to get the colours you mentioned in
your first post.
Why do you want this in the console window anyway? If you want something
that looks nice, you really need a GUI.