- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
// Example of a string bug: entering a password
char ok = 0, password[16];
scanf("%s", password);
if (!strcmp(password, "correct")) ok = 1;
if (!ok) {
printf("Wrong password\n");
return 1;
}
printf("Password accepted\n");
return 0;
Follow us!
Комментарии (0) RSS
Добавить комментарий