C++ program to find ASCII Code for Characters and numbers




C++ Program Write a Program to Enter Char or Number and Check its ASCII Code

#include <iostream>
using namespace std;

int main(){
  char ascii;
  int numeric;
  cout << "Give character: ";
  cin >> ascii;
  cout << "Its ascii value is: " << (int) ascii << endl;
  cout << "Give a number to convert to ascii: ";
  cin >> numeric;
  cout << "The ascii value of " << numeric << " is " << (char) numeric;
  return 0;
}

/*
OUTPUT
Give character: c
Its ascii value is: 99
Give a number to convert to ascii: 97
The ascii value of 97 is a
*/

 

Different ways of asking the above question

  • How to find ASCII value of character in C++
  • ASCII code and character variables – C++ Tutorial
  • Getting ASCII Code in C++
  • ASCII in the console…‎
  • converting char to ascii code‎
  • ASCII Character code advancement, in a C‎++
  • C++ – printing ASCII codes of characters stored
  • How to return the ASCII code value of a character in C++
  • Searches related to ASCII Code for Characters in C++ program
  • C++ convert char to ascii code
  • Ascii table C++
  • extended ascii C++
  • unicode characters C++
  • special characters C++
  • ascii characters C++
  • ascii characters visual c++
  • ascii characters C++
  • C++ Program Write a Program to Enter Char and Check its ASCII Code How to find ASCII value of character in c++ c++ – Scanning ascii value of each character of a string
  • Get ASCII character from number in C/C++

 


Partner Sites

VideoToGifs.com

EasyOnlineConverter.com

SqliteTutorials.com





Leave a Reply

Your email address will not be published.


*