Search This Blog

Thursday, October 13, 2011

Write a program to read any char and display its ASCII value

   1:  #include<stdio.h>
   2:  #include<conio.h>
   3:  void main()
   4:  {
   5:  char ch;
   6:  printf("Enter the character:\n");
   7:  ch=getche();
   8:  printf("\nASCII value of %c is %d\n",ch,ch);
   9:  getch();
  10:  }

No comments:

Post a Comment