#include <stdio.h>
int main(void)
{
char caracter;
/*Pedimos un caracter al usuario y lo almacenamos en la variable caracter*/
printf ("Escriba un caracter y pulse Intro:");
caracter=getchar();
/*Mostramos el caracter y su codigo ASCII*/
printf("\nEl codigo ASCII de %c es: %d", caracter, caracter);
/*Hacemos una pausa hasta que el usuario pulse Intro*/
fflush(stdin);
printf("\nPulse Intro para finalizar...");
getchar();
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: