#include "stdio.h"
#include "string.h"
int main(int argc, char* argv[])
{ char key[]="passwd"; // 变量生长是由高到低 变量内容生长是由低到高
char c[8];
l1: puts("input the key:");
gets(c);
if(strcmp(key,c)==0)
goto l2;
else goto l1;
l2: puts("correct");
return 0;
}
输入20个 "w"
密码就成"w"了
debug时看看内存就知道了