Skip to content

Instantly share code, notes, and snippets.

@scratchyourbrain
Created December 12, 2014 11:14
Show Gist options
  • Save scratchyourbrain/2fa2cc61fc62cefc0816 to your computer and use it in GitHub Desktop.
Save scratchyourbrain/2fa2cc61fc62cefc0816 to your computer and use it in GitHub Desktop.
c program to find ascii value of a character
/* to find ASCII value of a character entered by user */
#include <stdio.h>
int main()
{
char c;
printf("Enter a character: ");
scanf("%c",&c);
printf("ASCII value of %c = %d\n",c,c);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment