From 5a44f405cd016662302b56642c5d8e4009dee0f0 Mon Sep 17 00:00:00 2001 From: venky0426 Date: Tue, 20 Feb 2024 14:13:50 +0530 Subject: [PATCH 1/3] First Commit --- test.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test.py diff --git a/test.py b/test.py new file mode 100644 index 0000000..a73b9c2 --- /dev/null +++ b/test.py @@ -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; +} From 65ecb8101af9e78075b9a217ed3a6525864d45d8 Mon Sep 17 00:00:00 2001 From: Venkey HM <156779372+Venky0426@users.noreply.github.com> Date: Tue, 20 Feb 2024 14:20:24 +0530 Subject: [PATCH 2/3] Update test.py --- test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test.py b/test.py index a73b9c2..1af41d4 100644 --- a/test.py +++ b/test.py @@ -1,12 +1,12 @@ #include int main() { - char c; + char v; printf("Enter a character: "); - scanf("%c", &c); + scanf("%d", &d); // %d displays the integer value of a character // %c displays the actual character - printf("ASCII value of %c = %d", c, c); + printf("ASCII value of %d = %d", c, c); return 0; } From df330140eab69563d721dd7fd7633680a4d1c453 Mon Sep 17 00:00:00 2001 From: Venkey HM <156779372+Venky0426@users.noreply.github.com> Date: Tue, 20 Feb 2024 14:36:32 +0530 Subject: [PATCH 3/3] 22BCAE66 --- test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.py b/test.py index 1af41d4..50aa799 100644 --- a/test.py +++ b/test.py @@ -1,6 +1,6 @@ #include int main() { - char v; + char c; printf("Enter a character: "); scanf("%d", &d);