Skip to content

Instantly share code, notes, and snippets.

@kylelk
Last active December 22, 2015 02:08
Show Gist options
  • Save kylelk/6400938 to your computer and use it in GitHub Desktop.
Save kylelk/6400938 to your computer and use it in GitHub Desktop.
ASCII Value
/* Source code to find ASCII value of a character entered by user */
#include <stdio.h>
int main(){
char c;
printf("Enter a character: ");
scanf("%c",&c); /* Takes a character from user */
printf("ASCII value of %c = %d",c,c);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment