Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- void ascii(char); //declaro prototipo de funcion
- int main()
- {
- char c;
- printf("ingrese caracter\n");
- scanf("%c",&c);
- ascii(c);
- return 0;
- }
- void ascii(char c){ // HAaaaaORA declaro la funcion
- printf("El valor ASCII sin signo es : %d\n",(c<0)?(256+c):c);
- printf("El valor ASCII con signo es : %d\n",c);
- printf("El valor ASCII octal es : %o\n",(c<0)?(256+c):c);
- printf("El valor ASCII hexadecimal es : %x\n",(c<0)?(256+c):c);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement