program to accept character & display its ASCII value and its next &previous character


#include<stdio.h>
#include<conio.h>
void main()
 {
 char ch;
 clrscr();
 printf("\n enter the value ch");
 scanf("\n %c",&ch);
 printf("\n the ascii value of character is %d",ch);
 printf("\n the next ascii character is %c",ch+1);
 printf("\n the privious ascii character is %c",ch-1);
 getch();
 }
/*output

 enter the value ch   c

 the ascii value of character is 99
 the next ascii character is d
 the privious ascii character is b*/