WAP a program in c++ to find the ASCII values of a letter in a word
Answers
Answered by
0
Answer:
Example: Print ASCII Value in C++
#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;
}
Output
Enter a character: p
ASCII Value of p is 112
When we explicitly print the integer value of a char type, it's corresponding ASCII value is printed.
Similar questions