Contact Learn C
Copy

Program 353: Print ASCII value of given Character and Print its next character

Program 353: Print ASCII value of given Character and Print its next character
 
#include<stdio.h>
main()
{
 char c;
 printf("Enter a character\n");
 scanf("%c",&c);
 printf("The ascii value of %c is %d\n",c,c);
 if((c+1)>127 && (c+1)<0){
  printf("There is no next character after %c\nFor reference check ASCII Sheet\n",c);
 }
 else{
  printf("The character after %c is %c\n",c,c+1);
 }
 
}
Explanation:

//Coming Soon

Output:



Donate

Download App and Learn when ever you want

Get it on PlayStore
Get it on Amazon App Store
Get it on Aptoide