Answers for "ascii to char in c++"

C++
14

char ascii c++

#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;
}
Posted by: Guest on June-24-2020
0

how to convert ascii to char in cpp

#include<bits/stdc++.h>
using namespace std;
int main(){
  char a=char(97); //ascii value of a
  cout<<a;
}
Posted by: Guest on August-15-2021
0

c++ program to convert character to ascii

/*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<<"\nASCII value of "<<a<<"="<<num;
	return 0;
}
Posted by: Guest on March-17-2022

Browse Popular Code Answers by Language