Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gs-niteesh/04ad50beeadbc84d65bda6cac207e534 to your computer and use it in GitHub Desktop.
Save gs-niteesh/04ad50beeadbc84d65bda6cac207e534 to your computer and use it in GitHub Desktop.
// program for ascii values
#include <stdio.h>
int main()
{
char ch;
scanf("%d", &ch);
int d = ch;
char pc = ch - 1;
char nc = ch + 1;
printf("%d\n, d);
printf("%c %c\n", pc, nc);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment