

Task

Given a character value in your language, print its code   (could be ASCII code, Unicode code, or whatever your language uses).



Example

The character   'a'   (lowercase letter A)   has a code of 97 in ASCII   (as well as Unicode, as ASCII forms the beginning of Unicode).

Conversely, given a code, print out the corresponding character.




void main() {
    import std.stdio, std.utf;
 
    string test = "a";
    size_t index = 0;
 
    // Get four-byte utf32 value for index 0.
    writefln("%d", test.decode(index));
 
    // 'index' has moved to next character input position.
    assert(index == 1);
}