Code output is not as expected
First, a general remark: most of your variables are never used. You
should get rid of them, as they only serve to make your code more
obscure.

Then, the reason for the observed behavior is that you are comparing the
entered code with 4 predefined codes. Whatever the user enters, there
will be at least 3 non-matches, hence 3 times the program prints “not
eligile”.

To get the behavior you expect, I would get rid all all those boolean
variables that make the logic hard to follow, and instead break down the
problem into smaller chunks, each implemented in its own small function.
This makes it easier to write code that is easy to understand.

First, how do you tell whether two 4-character codes are the same? Like
this:



// Do codes a and b match?
bool match(char a[4], char b[4]) {
    for (int i = 0; i &lt; 4; i++) {
        if (a[i] != b[i])
            return false;
    }
    return true;
}


Then, given a code entered by the user, tell whether it matches
adhaar[0] or adhaar[1] or... or none of them:

// Return the adhaar index matching the given key,
// or -1 if there is no match.
int matching_idx(char key[4]) {
    for (int i = 0; i &lt; 4; i++) {
        if (match(key, adhaar[i]))
            return i;
    }
    return -1;  // no match
}


Now your checkkey() function can be rewritten as follows:

void checkkey() {
    if (i != 4) return;  // should never happen
    if (matching_idx(num) == -1)
        Serial.println(" not eligile");
    else
        Serial.println(" cast your vote");
    i = 0;
}