这个主要是简单考察怎么使用strcmp函数,下面是一个实现,供参考:
#include <stdio.h>
#include <string.h>
int main(void){
char pass[50];
char pwd[50]="password";
scanf("%s",pass);
if(strcmp(pass,pwd)==0){
printf("Yes");
}else{
printf("No");
}
return 0;
}