【发布时间】:2015-03-09 14:07:03
【问题描述】:
#include <stdio.h>
#include <stdlib.h>
#include<string.h>
int main()
{
char string;
printf("Hello\n");
printf("What would you like to do\n");
printf("Here are the options\n");
printf("s : How are you\n");
printf("c : What would you like to search\n");
scanf("%s",&string);
if(string == 'h')
printf("iam fine\n");
else if (string == 's')
printf("What would you like to search\n");
scanf("%s",&string);
system(string);
return 0;
}
当我在它说你想搜索什么之后运行它并输入 run notepad 它停止工作。
【问题讨论】: