#include <stdio.h>int main(){ char s[10]; gets(s); printf("%s",s); if(s=="str") printf("1\n");}输入str之后打印出来结果是str,但是没办法进行字符串的if判断。