<强> 强>
<强> 强>
,
# include
# include
#定义口令“1234567”
int verify_password (char *密码)
{
,,,,,,,,intauthenticated;
,,,,,,,,charbuffer [8];//8
,,,,,,,,验证=strcmp(密码,密码);
,,,,,,,,strcpy(缓冲区,密码);//
,,,,,,,,returnauthenticated;
}
主要()
{
,,,,,,,,intvalid_flag=0;
,,,,,,,,charpassword [1024],
,,,,,,,,而(1)
,,,,,,,,{
,,,,,,,,,,,,,,,,,,printf (“:”);
,,,,,,,,,,,,,,,,,,scanf (“% s”,密码);
,,,,,,,,,,,,,,,,,,valid_flag=verify_password(密码);
,,,,,,,,,,,,,,,,,,如果(valid_flag)
,,,,,,,,,,,,,,,,,,{
,,,,,,,,,,,,,,,,,,,,,,,,,,,printf (" ! \ n \ n”);
,
,,,,,,,,,,,,,,,,,,}
,,,,,,,,,,,,,,,,,,其他
,,,,,,,,,,,,,,,,,,{
,,,,,,,,,,,,,,,,,,,,,,,,,,,printf (" ! \ n”);
,,,,,,,,,,,,,,,,,,,,,,,,,,,打破;
,,,,,,,,,,,,,,,,,,}
,,,,,,,,}
}
,
,
,
,
2
,
,
,
4 8 q
5
6 ASCII71q 68 qbuffer0018fb4cauthenticated
,
,
1,
2,
3,这个64年