Created
July 29, 2019 22:57
-
-
Save parzibyte/3c95b364c8576dbd397520517cb3e69b to your computer and use it in GitHub Desktop.
Char a int en C - https://parzibyte.me/blog/2018/11/19/digito-char-entero-c/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Char a int en C | |
@author parzibyte.me | |
*/ | |
#include <stdio.h> | |
int main(){ | |
char caracter = '2'; | |
int comoEntero = caracter - '0'; | |
printf("El carácter '%c' es %d en entero", caracter, comoEntero); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment