From 7dd23d823bf510d5526cf053f858a3697ec86a58 Mon Sep 17 00:00:00 2001 From: Abhishek singh lodhi <80988197+ABHISHEK-565@users.noreply.github.com> Date: Wed, 26 Oct 2022 22:29:31 +0530 Subject: [PATCH] Create ASCII value --- c/ASCII value | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 c/ASCII value diff --git a/c/ASCII value b/c/ASCII value new file mode 100644 index 0000000..07a38ea --- /dev/null +++ b/c/ASCII value @@ -0,0 +1,13 @@ +#include +int main() { + char c; //variable declaration + printf("Enter a character: "); + scanf("%c", &c); //taking input + + // %d displays the integer value of a character + // %c displays the actual character typed by you + + printf("ASCII value of %c = %d", c, c); + + return 0; +}