I just started off on c and can't get this to work,
I tried to edit the code several times and even looked online for some examples but failed to understand how this would work.
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
int main()
{
const char p1[10]="admin";
char p2[10];
printf("Password Required:");
scanf("%s", &p2)
if (p2==p1)
{
printf("Access Granted")
}
else
{
printf("Invalid Password")
}
}
It's meant to verify if the password entered is correct.