In order to print a character using its ASCII value, you need to first assign it to a char value like this:
char c = (char) 65;
In this example, we are casting the int 65 to a char, which converts it to an 'A', since 65 is the ASCII value for the capital letter 'a'.
Next, you can print it out if you want:
System.out.println(c);
That's pretty much all there is to it!
Chat with our AI personalities
Its Unicode value is 221A according to System tool Character map Advanced view Unicode subrange Math operators. But I haven't done C in awhile, so I don't know how to or if you can. ASCII value of root symbol is 251. In C we can print this symbol by printing the character value as below printf("%c",251); this will print the root symbol
There is no ASCII value of :-) ASCII encodes only single characters, assigning a numerical 0-127 value to each character. However, if you want the ASCII encoding of a smiley, here's some samples (using Hex values): :-) 0x3A2D29 :) 0x3A29
The ascii value of zero - is 48.
Ascii value of 5 is 53.
You can find the ASCII value of numbers greater than 9 using the following functions: std::to_string or boost::lexical_cast or std::ostringstream depending on the compiler that you are using.