#include <stdio.h> #include <string.h> #include <stdlib.h> bool IsPasswordOK(void) { char Password[12]; gets(Password); return 0 == strcmp(Password, "goodpass"); } int main(void) { bool PwStatus; puts("Enter password:"); PwStatus = IsPasswordOK(); if (PwStatus == false) { puts("Access Denied"); exit(-1); } else { puts("Access Granted"); } return 0; }
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课