by Dinesh Thakur Category: C Programming (Pratical)

This program asks user to check whether the given char code is ASCII or not. ASCII code means the character code that brings in a numeric form for every character so that computer can read the content because computer only understands the machine language or binary system. ASCII stands for (American standard code for information interchange). There are different type of ASCII code like for Capital characters ASCII code numeric value starts from 65 (A=65) or small characters like a starts from 97 (a=97).

In this program user need to check out the ASCII code for character for this user declare a variable name m1 that will be contain the value for ASCII code checking process. User uses control statement for checking the ASCII code. User asks to enter the value as character. if(m1>=65&&m1<=90) then the character value will be added with 32 to find out the ASCII value else the condition will be if(m1>=97&&m1<=122) then the value will be deducted from 32. And if not any condition lies true then message will be nothing for both character values.
Problem Statement:
This is C program to check out the ASCII code value for character.

  1. Declare the variables.
  2. Using control statements.
  3. Display result on the screen.

Here is C source code for Checking out the ASCII value for character. Output of this program shown below. 


void main()
      char m1,m2;
      printf("Enter any Char : ");
           printf("m2 : %c",m2);
     else if(m1>=97&&m1<=122)
                  printf("m2 : %c",m2);

Char and Check its ASCII Code or Not

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.C.A, MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.