Skip to main content

How to get ASCII values of A to Z

ASCII stands for American Standard Code for Information Interchange. Like how we understand A to Z in simmilar way machine understand A to Z in some language. So let’s see what is ASCII value of A to Z which require to perform electronic communication. modern character-encoding schemes are based on ASCII.

To print ASCII value of A to Z in C Programming Language. ASCII contains fix integer value.

So in this program will print the A to Z and using %d we will try to print associated ASCII Value for each character. So to get below output here is complete c program code.

Output

ASCII Value of A is 65
ASCII Value of B is 66
ASCII Value of C is 67
ASCII Value of D is 68
ASCII Value of E is 69
ASCII Value of F is 70
ASCII Value of G is 71
ASCII Value of H is 72
ASCII Value of I is 73
ASCII Value of J is 74
ASCII Value of K is 75
ASCII Value of L is 76
ASCII Value of M is 77
ASCII Value of N is 78
ASCII Value of O is 79
ASCII Value of P is 80
ASCII Value of Q is 81
ASCII Value of R is 82
ASCII Value of S is 83
ASCII Value of T is 84
ASCII Value of U is 85
ASCII Value of V is 86
ASCII Value of W is 87
ASCII Value of X is 88
ASCII Value of Y is 89
ASCII Value of Z is 90
#include <stdio.h>
int main()
{
    char ascCh; //declaring variable which start from Alphabet A
    for(ascCh='A'; ascCh<='Z'; ascCh++)
    {
        printf("ASCII Value of %c is %d\n", ascCh,ascCh);
    }
    return 0;
}