Write a program in C++ to print the code (ASCII code / Unicode code etc.) of a given character
- برمجة سي بلس بلس
- برمجة
- 2021-05-11
- MarwaMohammed
الأجوبة
#include <iostream>
using namespace std;
int main()
{
char sing_ch;
cout << "\n\n Print code (ASCII code / Unicode code etc.) of a given character:\n";
cout << "-----------------------------------------------------------------------\n";
cout << " Input a character: ";
cin >> sing_ch;
cout <<" The ASCII value of "<<sing_ch<<" is: " <<(int)sing_ch << endl;
cout <<" The character for the ASCII value "<<(int)sing_ch <<" is: "<<(char)((int)sing_ch) << endl<< endl;
return 0;
}أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال
