#include<bits/stdc++.h>
using namespace std;
int main(){
char a=char(97); //ascii value of a
cout<<a;
}
/*Q; Design a program that take a char value from the
user and display the ASCII value of the entered value?*/
#include<iostream>
using namespace std;
int main()
{
char a;
cin>>a;
int num=(int)a;
cout<<"
ASCII value of "<<a<<"="<<num;
return 0;
}
Code Example |
---|
Cpp :: anagram solution in c++ |
Cpp :: how to specify the number of decimal places in c++ |
Cpp :: print vector c++ |
Cpp :: stl vector |
Cpp :: string split by space c++ |
Cpp :: memory leak in cpp |
Cpp :: max in c++ |
Cpp :: cpp func as const |
Cpp :: integer to char c++ |
Cpp :: a square plus b square plus c square |
Cpp :: how to calculate bitwise xor c++ |
Cpp :: classes constructor in c++ |
Cpp :: how to make Dijkstra in c++ |
Cpp :: c++ looping through a vector |
Cpp :: c++ random generator |
Cpp :: c++ float and double |
Cpp :: cpp array init value |
Cpp :: SUMOFPROD2 |
Cpp :: how to create 2d array using vector in c++ |
Cpp :: two elements with difference K in c++ |
Cpp :: template c++ |
Cpp :: c++ read matttrix from text file |
Cpp :: c++ variable types |
Cpp :: print hola mundo |
Cpp :: pointers and arrays in c++ |
Cpp :: c++ get data type |
Cpp :: find the graph is minimal spanig tree or not |
Cpp :: how to pass an array by reference in c++ |
Cpp :: c++ std map initializer list |
Cpp :: STD::ERASE FUNCTION IN C++ |