How do I properly compare strings in C?
You can’t (usefully) compare strings using != or ==, you need to use strcmp: The reason for this is because != and == will only compare the base addresses of those strings. Not the contents of the strings themselves.