Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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<<"
ASCII value of "<<a<<"="<<num;
	return 0;
}
 
PREVIOUS NEXT
Tagged: #program #convert #character #ascii
ADD COMMENT
Topic
Name
5+2 =