Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions ARGC_ARGV/CeeY/password.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/**
5 5 *main- entry point
6 6 *Return: always 0
7 7 */

int main(int argc ,char* argv[])
{
int i;
char password[] = "Cohort 14";
if (argc < 2 || argc > 2)
{
printf("Error! Enter 2 arguments: i.e ./test correctPassword\n");
}

else if (strcmp(argv[1], password) == 0)
{

printf("Welcome, Password Success!\nTask passed!!!");
}
else
{
printf("Password Protected!!!\nPlease enter the correct password in this format: ./test correctPassw ord \n");
}
return (0);
}
Binary file added ARGC_ARGV/CeeY/test
Binary file not shown.