funtc76b.dat
来自「C++指令字典 一个方便的软件 用于C++指令的查询」· DAT 代码 · 共 20 行
DAT
20 行
realloc
#include <stdio.h>
#include <alloc.h>
#include <string.h>
int main(void)
{
char *str;
str= malloc(10);
strcpy(str, "Hello");
printf("String is %s Address is %p", str, str);
str = realloc(str, 20);
printf("String is %s New address is %p", str, str);
free(str);
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?