C language convert int to character

C language convert int to character

In C, characters are stored as ascii values.
You can find the values of all letters through the ascii table.

To convert ascii values to characters, type conversion can be performed directly

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main()
{
    int i=65; // A
    char ch;
    ch= (char)i;
    printf("%c", ch);
    return 0;
}
S‮ecruo‬:www.lautturi.com
Created Time:2017-08-29 09:19:47  Author:lautturi