📄 tst_realloc.c
字号:
#include <stdlib.h>
#include <stdio.h> /* for printf */
void tst_realloc (void) {
void xdata *p;
void xdata *new_p;
p = malloc (100);
if (p != NULL) {
new_p = realloc (p, 200);
if (new_p != NULL) p = new_p;
else printf ("Reallocation failed\n");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -