Created
April 29, 2017 12:12
-
-
Save fbarrios/efa1ab37c7d27b5be92e70181bf0b253 to your computer and use it in GitHub Desktop.
Test sprintf
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
// test.c | |
#include<stdio.h> | |
int main() | |
{ | |
size_t num = 100; | |
char cadena[10]; | |
sprintf(cadena, "%zd", num); | |
printf("%s\n", cadena); | |
return 0; | |
} | |
// ejecución | |
fede@debian:~/Downloads/test_sprintf$ gcc -g -std=c99 -Wall -Wconversion -Wno-sign-conversion -Werror -o test test.c | |
fede@debian:~/Downloads/test_sprintf$ ./test | |
100 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment