编辑代码

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int main () {
    // gets puts fgets strlen strcpy strcmp
	char *str="hello";
    char a[6];
	char *b=(char*)malloc(sizeof(a)+1);

	fgets(a,sizeof(a),stdin);
	puts(a);

    printf("%d\n",strlen(a));

	strcpy(b,str);
    printf("%s\n",b);

	printf("%d\n",strcmp(a,b));
    //printf("%d",)
    
    
    //JSRUN引擎2.0,支持多达30种语言在线运行,全仿真在线交互输入输出。 
    //printf("Hello world!     - c.jsrun.net.");
    return 0;
}