This commit is contained in:
Light-City
2019-12-12 16:09:55 +08:00
parent 3ae20ae621
commit 4f149eec72
38 changed files with 1770 additions and 9 deletions

View File

@@ -0,0 +1,19 @@
//
// Created by light on 19-12-12.
//
#include <stdio.h>
#include <string.h>
#include <malloc.h>
int main() {
char *str = (char *) malloc(7);
strcpy(str, "toptal");
printf("char array = \"%s\" @ %u\n", str, str);
str = (char *) realloc(str, 11);
strcat(str, ".com");
printf("char array = \"%s\" @ %u\n", str, str);
free(str);
return(0);
}