?? realloc.c
字號:
#include <stdio.h>
#include <alloc.h>
void main(void)
{
char *string, *new_string;
if ((string = (char *) malloc(100)))
{
printf("Successfully allocated a 100 byte string\n");
if ((new_string = (char *) realloc(string, 1000)))
printf("String size increased to 1000\n");
else
printf("Error reallocating the string\n");
}
else
printf("Error allocating the 100 byte string\n");
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -