Does anyone know of an easy way in C to check if a an element is NOT in a given array?
I think it would be fairly easy to determine if an element IS in an array by looping through it and seeing if an element is equal to the element I’m looking for.
But how do you determine if it’s NOT in there? For example, say I were using a nested loop… setting the condition if [i] != [j] don’t tell me if the element in [i] is nowhere in [j]…it just says that they’re not currently equal on that current iteration.
I believe Python has a function that lets you search If something is In or Not In a List or other collection. But does C?