From bbf83060376d3fa66200650e36d935c25aebc33a Mon Sep 17 00:00:00 2001 From: csajce <72405873+csajce@users.noreply.github.com> Date: Wed, 20 Oct 2021 20:50:37 +0530 Subject: [PATCH] zc --- ascii.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 ascii.c 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; +}