Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

how to print a character with its ascii value in c++

//It is almost know to everybody , how to print an ASCII code of a character.
#include <bits/stdc++.h>
using namespace std;
int main()
{
	int var=65;
	cout<<(char)var<<endl; //By this way, you can get the character with that mentioned ASCII code.
	return 0;
}
 
PREVIOUS NEXT
Tagged: #print #character #ascii
ADD COMMENT
Topic
Name
9+7 =