Header Ads Widget

C Program To Find A Character Of ASCII Value

Write a C program to accept a ASCII code from user and display its character value. ASCII stands for American Standard Code for Information Interchange. ASCII codes represent text in computer. So, let’s start to develop our program.


Output will be look like this:

Enter ASCII code to find it’s character: 65

Character value of ‘65’ is ‘A’.


Program :

/* Author: CodeTryCatch
*C Program to find Character of a ASCII value
*/
#include<stdio.h>
void main()
{
    int alpha;
    printf("Enter ASCII code to find it's character:");
    scanf("%d",&alpha);
    printf("\nOutput :\n\n");
    printf("Character value of '%d' is '%c'.\n\n",alpha,alpha); 
}


Step by step descriptive logic of a program.

Step 1 : First we have to declare one variable of integer type to accept input from user.

Step 2 : To print Character value of entered ASCII code, here we used %c format specifier.

Step 3 : ASCII code returns text representation because of %c format specifier.


Output :



Keep coding...

Thanks for visiting….😊

Post a Comment

0 Comments