69,371
社区成员
发帖
与我相关
我的任务
分享
#include <stdio.h>
#include <string.h>
void main(){
char str[1024];
printf("input:\n");
scanf("%s",str);
printf("%s",str);
}
#include <stdio.h>
#include <string.h>
void main(){
char *str;
str = (char *)malloc(1024);
printf("input:\n");
scanf("%s",str);
printf("%s",str);
free(str);
str = NULL;
}
#include <stdio.h>
#include <string.h>
void main()
{
char * str;
char strArray[256];
str=strArray;
printf("input:\n");
scanf("%s",str);
printf("%s",str);
}