/*
Program to Print ASCII TABLE in C++
*/
#include <iostream>
using namespace std;
void main()
{
for (int i = 0; i<256; i++)
cout << i << "\t" << char (i) << endl;
}
//------------------------------------------------------------------OR---------------------------------------------------------------
#include <iostream>
using namespace std;
void main()
{
for (int i = 0; i<256; i++)
cout << i << "\t" << static_cast<char> (i) << endl;
}
No comments:
Post a Comment