C Program to Find ASCII Value of a Character

Get Certified in C Programming and Take Your Skills to the Next Level

Program 1

#include<stdio.h>
#define clrscr() system("cls")
int main()
{
    int i;
    char ch;
    clrscr();
    
    printf("\n Character \t Ascii Values");
    for(i=0;i<=255;i++) 
    {
        ch=i; // implicit type conversion

        printf("\n%c\t %d",ch,i);
    }
    return 0;
}

 

Did you know we work 24x7 to provide you best tutorials
Please encourage us - write a review on Google

courses

TechVidvan Team

TechVidvan Team provides high-quality content & courses on AI, ML, Data Science, Data Engineering, Data Analytics, programming, Python, DSA, Android, Flutter, full stack web dev, MERN, and many latest technology.

Leave a Reply

Your email address will not be published. Required fields are marked *