Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
- int check(char *password){
- char a[100];
- strcpy(a, password);
- if(strcmp(a, "password12345")==0){
- printf("Correct : %s \n", a);
- }else{
- printf("False: %s \n", a);
- }
- return 0;
- }
- int main(int argc, char *arguments[]){
- if(argc < 2){
- printf("too few arguments\n");
- exit(0);
- }
- check(arguments[1]); //<--- here this part, arguments[1] is supposed to be a string, not a character
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement