Horje
char ASCII in c Code Example
char ASCII in c
#include <stdio.h>
int main()
{
/*
When a character is entered by the user in the above program, 
the character itself is not stored. Instead, an integer value (ASCII value) is stored.

And when we display that value using %c text format, 
the entered character is displayed. If we use %d to display the character,
it's ASCII value is printed.
*/
    char chr;
    printf("Enter a character: ");
    scanf("%c",&chr);  
    printf(" char in  ASCII value %d.", chr); 
    printf("You entered %c.", chr);  
    return 0;
}




C

Related
remove char from string Code Example remove char from string Code Example
how to pprint otu a double in in c Code Example how to pprint otu a double in in c Code Example
i765 OPT filing  fees october 2 Code Example i765 OPT filing fees october 2 Code Example
pass in c Code Example pass in c Code Example
notation of positive in c Code Example notation of positive in c Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7