ASCII code chart..
I wrote this code..to show ASCII code, their hex value, and the symbol associated with it...but sololearn compiler shows (Time out)..before even executing full code..i think maybe its a slow algorithm ..can someone suggest a faster algorithm..for this.. CODE>> #include <iostream> using namespace std; int main() { int a[127]; // an array of 128 elements for (int i=0;i<128;i++) //loop { cout<<" For ("<<i<<") : "; cout<<"Hex "<<"= " ; std::cout.setf(std::ios::hex); cout<<hex<<" "<<i<<" " ; std::cout.unsetf(std::ios::hex); cout<<"Character: "<<(char) i; /* i have included (char) to change data type into character..*/ if(i<33) cout<<"null"<<endl; //i added this becoz it does not have symbol upto ASCII code 33 else cout<<endl; } return 0; }