Search
 
SCRIPT & CODE EXAMPLE
 

CPP

ascii cpp

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

C++ ASCII Value

//Find the ASCII value of a character and character of an ASCII value.
    char x;
    int y;

    cout<<"Enter a Character: ";
    cin>>x;
    cout<<"Enter the ASCII value: ";
    cin>>y;
    cout<<"The ASCII value of "<<x<<" is "<<int(x)<<endl;
    cout<<"The Character of the ASCII value of "<<y<<" is "<<char(y);
Comment

PREVIOUS NEXT
Code Example
Cpp :: zero fill in c++ 
Cpp :: c++ program to convert kelvin to fahrenheit 
Cpp :: function overloading in c++ 
Cpp :: c++ random generator 
Cpp :: input n space separated integers in c++ 
Cpp :: how to cout in c++ 
Cpp :: set to vector 
Cpp :: vector c++ 
Cpp :: c++ multiple inheritance 
Cpp :: cpp ifdef 
Cpp :: how to remove maximum number of characters in c++ cin,ignore 
Cpp :: how to create 2d array using vector in c++ 
Cpp :: how to create a file in c++ 
Cpp :: C++ Integer Input/Output 
Cpp :: grep xargs sed 
Cpp :: break statement in c++ program 
Cpp :: resize vector c++ 
Cpp :: selection sort c++ 
Cpp :: initialise 2d vector in c++ 
Cpp :: sum of first 100 natural numbers 
Cpp :: c++ convert int to cstring 
Cpp :: what is a variable in cpp 
Cpp :: string concatenation operator overloading c++ 
Cpp :: find maximum sum in array of contiguous subarrays 
Cpp :: c ++ program to insert into hashmap 
Cpp :: casting to a double in c++ 
Cpp :: time complexity 
Cpp :: count c++ 
Cpp :: fractional knapsack problem 
Cpp :: how to set arrays as function parameters in c++ 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =