例1-1.c

来自「C语言高级编程及实例剖析/王为青, 刘变红编著 ISBN号: 978-7」· C语言 代码 · 共 17 行

C
17
字号
/* Note:Your choice is C IDE */
#include <stdio.h>
#include <stdlib.h>
main()
{
    char * str;
    if((str=(char *)malloc(50))==NULL)
	{
      printf("\n No enough memory to allocata for the string.");
      exit(1);
	}
printf("\n Input the string:");
	gets(str);
	puts(str);
	     free(str);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?