Write C program to print ASCII values of all characters

Introduction

Write C program to print ASCII values of all characters.

#include <stdio.h>

int main()
{
    int i;

    // Printing ASCII values from 0 to 255
    for(i=0; i<=255; i++)
    {
        printf("ASCII value of %c = %d\n", i, i);
    }

    return 0;
}

Result

Write C program to print ASCII values of all characters.
Write C program to print ASCII values of all characters.

Leave a Comment