Created
April 9, 2016 16:16
-
-
Save farhaven/efe4a9a8455c1a92bb66053923158ac1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 *abc = "abcfoo"; | |
char *def = "deffnord"; | |
char *res = NULL; | |
ssize_t sz = asprintf(&res, "%s%s", abc, def); | |
if (sz >= 0) { | |
printf("Made a string: '%s'\n", res); | |
} | |
free(res); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment