Answers for "find ascii value by using code in c++"

C++
1

Enter a key and display it's ascii value in c++

#include<iostream.h>
#include<conio.h>
void main()
{
  char a;
  clrscr();
  cout<<"nEnter any key: ";
  cin>>a;
  cout<<"ASCII value of "<<a<<" is: "<<int(a);
  getch();
}
Posted by: Guest on November-07-2020
0

get ascii value of string in C++

int main()
{
 char *s="hello";
 while(*s!='')
  {
  printf("%c --> %dn",*s,*s);
  s++;
  }
 return 0;
}
Posted by: Guest on December-29-2020

Code answers related to "find ascii value by using code in c++"

Browse Popular Code Answers by Language