For loop count by characters instead of by numbers - C Statement

C examples for Statement:for

Description

For loop count by characters instead of by numbers

Demo Code

#include <stdio.h>
int main(void)
{
    char ch;//w  w  w  .ja v  a  2s .  c  om
    
    for (ch = 'a'; ch <= 'z'; ch++)
        printf("The ASCII value for %c is %d.\n", ch, ch);
    return 0;
}

Result


Related Tutorials