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