#include <stdio.h> /** The main use is the conversion between ASCII and ASCII character value to achieve this function */ int main(void) { char n-= ' A ' ; // the printf ( "% D \ n-", n-); explain, char is an integer type, only one byte, the value of the output here is equivalent to complete conversion of a value type, ASCII output code is the value of // random input letter case of printf ( " Please enter whatever you want to convert a value: " ); scanf ( " % c " , & the n-); // printf ( "% d \ the n-", the n-); test; Note that I output is% d,% c is not if (n <= 'z' && n >='a') { n- = n-- 32 ; // finally explained in detail herein } the else IF (n-<= ' the Z ' && n-> = ' A ' ) { n = n + 32; } // output n- the printf ( "converted value: % C \ n- " , n-); return 0; } /** % C means to convert the integers to ASCII characters */