Skip to content

Instantly share code, notes, and snippets.

@FahimFBA
Last active June 22, 2022 16:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FahimFBA/e0c9c3697db9dd45301edb8cdde499db to your computer and use it in GitHub Desktop.
Save FahimFBA/e0c9c3697db9dd45301edb8cdde499db to your computer and use it in GitHub Desktop.
A simple yet handy calculator written in C to generate the ASCII value of any character.

How to Get the ASCII Value of Any Character with One Line of Code

Check the details from here.

#include <stdio.h>
void main()
{
    char ch;
    printf("Enter a character: ");
    scanf("%c", &ch);
    printf("The ASCII value of %c is: %d\n", ch, ch);
}
@Nels22
Copy link

Nels22 commented Jun 22, 2022

This was quite helpful. I sure learnt something. Thanks.

@FahimFBA
Copy link
Author

This was quite helpful. I sure learnt something. Thanks.

I am glad that it helped you. 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment