Each character is represented by a number. When you print a char it will print it as a character. It will not print the number.
In code 1 you might see some character, or you might not see anything at all because 1 might not map to any printable character.
Code 2 will do the exact same as code 1 because char is an integer type so the decimal part will be discarded.
In code 3 you need to put single quotes around the character 'a'. This will write the number that represents the character a to k. Assuming some ASCII compatible encoding is used the number is 97.
If you want to print the number stored by a char you can do that by casting the value to an int before printing.
1 2
char c = 'a';
cout << static_cast<int>(c) << endl;