C语言库realloc()函数

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main () {
   char *str;

   /* Initial memory allocation */
   str = (char *) malloc(15);
   strcpy(str, jb51.cc);
   printf(String = %s,  Address = %u\n, str, str);

   /* Reallocating memory */
   str = (char *) realloc(str, 25);
   strcat(str, .com);
   printf(String = %s,  Address = %u\n, str, str);

   free(str);
   return(0);
}

相关文章

for遍历数组
。。。
声明一个计数循环
咕咕咕
#include <stdio.h> int main (void) { printf (&quo...