RFID Tag Compare

UNTEngineer:
If it validates, it outputs once. If it doesnt validate, it outputs twice- for each tag it reads in.

From code inspection, I predict slightly different behaviour.

What it should do is compare the received RFID against each of your two hardcoded values in turn. For each comparison it prints either "This Card is a Match!" or "This Card is NOT a Match!".

If you want to clean this up I suggest you extract the comparison into a function that returns something to indicate whether the value is a match. If you want to know which one it matched, you could return the 0-based index into the target_tag array (and a negative value to indicate no match). Or if you don't care which one it matched, just return a boolean.

Then, based on the return value print out the appropriate trace message.

By the way, that's far from the worst code I've seen but in order to convince myself the logic was sound I reformatted it to put each { and } on a separate line with matching pairs indented by the same amount; I suggest you adopt that code style. I also suggest that you get into the habit of putting { and } after any if/else statement. Sure, it might work without it now when you only have one statement, but you've no idea how many times I've seen people tack an extra statement on the end - or inadvertently use a macro that expanded to more than one statement - and introduce a subtle bug. Use { and } to make the control structure as clear and robust as possible.