Function name : toastcii
Header file : <ctype.h>
Function prototype : int toast(int ch);
Function : Convert a character to ASCII, which actually means changing the highest eight-digit binary number to 0
Parameters : int ch character to be converted
Return value : Returns the converted character
Program example : Convert a non-ASCII character to ASCII character
#include<ctype.h>#include<stdio.h>intmain(){intch1,ch2;ch1='a'+128;ch2=toascii(ch1);printf(transform%cto%c.n,ch1, ch2);return0;}
Running results:
transform?toa.