#include <iostream>
using namespace std;
int main() {
char c;
cout << "Enter a character: ";
cin >> c;
cout << "ASCII Value of " << c << " is " << int(c);
return 0;
}
#include <iostream>
int main()
{
std::cout << "Printable ASCII [32..126]:
";
for (char i = ' '; i <= '~'; ++i) {
std::cout << i << ((i % 16 == 15) ? '
' : ' ');
}
}
//Find the ASCII value of a character and character of an ASCII value.
char x;
int y;
cout<<"Enter a Character: ";
cin>>x;
cout<<"Enter the ASCII value: ";
cin>>y;
cout<<"The ASCII value of "<<x<<" is "<<int(x)<<endl;
cout<<"The Character of the ASCII value of "<<y<<" is "<<char(y);
Code Example |
---|
Cpp :: min stack |
Cpp :: opengl triangle example |
Cpp :: Casino Number Guessing Game - C++ |
Cpp :: c++ string to vector int |
Cpp :: How to get the last element of an array in C++ using std::array |
Cpp :: c++ remove last element from array |
Cpp :: c++ vector remove element by value |
Cpp :: how to write hello world c++ |
Cpp :: how to create a structure c++ |
Cpp :: convert from hex to decimal c++ |
Cpp :: c++ destructor |
Cpp :: uses of c++ |
Cpp :: vector erase iterator |
Cpp :: c++ influenced |
C :: boilerplate c |
C :: clear screen c |
C :: debian apt force overwrite |
C :: haskell print |
C :: printf with bool |
C :: c data types |
C :: take array as input in c |
C :: input in c |
C :: linear search program in c |
C :: how to empty string in c |
C :: why do we need return 0 in c? |
C :: read string with space c |
C :: factorial of a number in c |
C :: C scanf() to read a string |
C :: grepper vscodium |
C :: Write a 64-bit program in assembly that prints Hello, world in .asm |