<<< Character Literals | Index | Integer Types >>> |
#include <iostream> void main() { char c; // Instantiate character variable std::cin >> c; // Input character from the user std::cout << c; // Echo character back to the user std::cout << '='; // Display equal sign std::cout << int( c ); // Display character code std::cout << '\n'; // Display new line }
<<< Character Literals | Index | Integer Types >>> |