+ 1
Ascii to int
can anyone suggest me how to convert any integer to its ASCII code and vice versa using c language
2 Antworten
+ 2
int x = 49;
char c = char(x)
char c = 'a'
int x = int(c)
0
This prints the ascii value of lowercase 'a' and convert ascii 97 to its character equivalent : 'a'
#include <stdio.h>
int main() {
char x = 'a' ;
printf("%d\n", x) ;
int y = 97;
printf("%c", y) ;
return 0;
}