Search
 
SCRIPT & CODE EXAMPLE
 

CPP

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;
}
Comment

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;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: c++ syntax 
Cpp :: c++ range based for loop 
Cpp :: 31. Next Permutation leetcode solution in c++ 
Cpp :: c++ get whole line 
Cpp :: c++ class template 
Cpp :: string format decimal places c++ 
Cpp :: rotate an array of n elements to the right by k steps 
Cpp :: how to convert string to int in c++ 
Cpp :: enum c++ 
Cpp :: system cpp 
Cpp :: Finding square root without using sqrt function? 
Cpp :: overload subscript operator cpp 
Cpp :: linked list cycle c++ 
Cpp :: CRED Coins codechef solution in c++ 
Cpp :: ue4 c++ replicate actor variable 
Cpp :: C++ program for Celsius to Fahrenheit and Fahrenheit to Celsius conversion using class 
Cpp :: resharper fold statement 
Cpp :: printing in column c++ 
Cpp :: what is function c++ 
Cpp :: c++ define constant in class header 
Cpp :: arduino falling edge 
Cpp :: count number of char in a string c++ 
Cpp :: Arduino Real TIme Clock 
Cpp :: #define in cpp 
Cpp :: find factorial in c++ using class 
Cpp :: C++ function inside main 
Cpp :: c++ last element of array 
Cpp :: replace a char in string c++ at a specific index 
Cpp :: Check whether the jth object is in the subset 
Cpp :: enter items in array until enter is pressed c++ 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =