Created
September 21, 2020 00:26
-
-
Save jose-marquez89/daba618fb852ecf43b127f14de352ac4 to your computer and use it in GitHub Desktop.
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
int reverse(int x) { | |
char *buffer = malloc(sizeof(int) * (log10(x) + 1)); | |
char new[3]; | |
sprintf(buffer, "%d", x); | |
printf("%c", buffer[2]); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment