TODAY JAVA SCHOOL

In java school, programming, design, computer general knowledge, web application, software, web services, social media, digital marketing, oops, concept of programming language, oops feature, console media, graphics medium, first programming, c, c ++ , Java, PHP, SQL, MySQL, HTML, HTML_5, J_query, JavaScript, Bootstrap, Framework, images with logos, examples, shared and explained.

https://www.amazon.in/b?node=26373545031&linkCode=ll2&tag=1234567801cdb-21&linkId=3b9882431b00409b44141e0344b35a15&language=en_IN&ref_=as_li_ss_tl

Breaking

Wednesday, 6 May 2020

ASCII Code In C Language | How To ASCII Value In C Language

ASCII value in C language


What is ASCII code?

The full form of ASCII is the American Standard Code for information interchange. It is a character encoding scheme used for electronics communication. 
Each character or a special character is represented by some ASCII code, and each ascii code occupies 7 bits in memory.

find the table image to download ascii code in c language

Fig: ASCII Code In C Langauge


C Programming Language, a character variable does not contain a character value itself rather the ascii value of the character variable. 

The ascii value represents the character variable in numbers, and each character variable is assigned with some number range from 0 to 127. 

For example


The ascii value of 'A' is 65.

We create a program which will display the ascii value of the character variable.

#include <stdio.h>  
int main()  
{  
    char c;     
    printf("Enter a character");  
    scanf("%c",&c); 
    printf("\n The ascii value of the c variable is  %c = %d",  c, c);  
    return 0;  
}  

Output:

Enter a character G
The ascii value of the c variable is 71


No comments:

Post a Comment