/****************************************************** * * * * * CSCI 1470; Fall 2005 * * Machine Problem: MP2A * * Purpose: Display the escape sequence characters * * in the different numbering systems. * ******************************************************/ #include using namespace std; int main(void) { cout << " ASCII Codes for Escape Sequence Characters" << endl; cout << endl; cout << "Escape Sequence" << " Name" << " ASCII Code" << " Hex Code" << " Octal Code" << endl; cout << "---------------" << " ----" << " ----------" << " --------" << " ----------" << endl; cout << "......\\n..........Newline.............." << dec << static_cast('\n') << "............" << hex << static_cast('\n') << "................" << oct << static_cast('\n') << endl; cout << endl; cout << "......\\t..........Horizontal Tab........" << dec << static_cast('\t') << "............" << hex << static_cast('\t') << "................" << oct << static_cast('\t') << endl; cout << endl; cout << "......\\a..........Alarm................." << dec << static_cast('\a') << "............" << hex << static_cast('\a') << "................." << oct << static_cast('\a') << endl; cout << endl; cout << "......\\b..........Backspace............." << dec << static_cast('\b') << "............" << hex << static_cast('\b') << "................" << oct << static_cast('\b') << endl; cout << endl; cout << "......\\r..........Return..............." << dec << static_cast('\r') << "............" << hex << static_cast('\r') << "................" << oct << static_cast('\r') << endl; cout << endl; cout << "......\\\\..........Backslash............" << dec << static_cast('\\') << "..........." << hex << static_cast('\\') << "..............." << oct << static_cast('\\') << endl; cout << endl; cout << "......\\'..........Single Quote........." << dec << static_cast('\'') << "..........." << hex << static_cast('\'') << "................" << oct << static_cast('\'') << endl; cout << endl; cout << "......\\\"..........Double Quote........." << dec << static_cast('\"') << "..........." << hex << static_cast('\"') << "................" << oct << static_cast('\"') << endl; cout << endl; return 0; } //End of function main