diff --git a/ascii.c b/ascii.c new file mode 100644 index 0000000..a73b9c2 --- /dev/null +++ b/ascii.c @@ -0,0 +1,12 @@ +#include +int main() { + char c; + printf("Enter a character: "); + scanf("%c", &c); + + // %d displays the integer value of a character + // %c displays the actual character + printf("ASCII value of %c = %d", c, c); + + return 0; +}