Review the week 3 lecture starting at the 40 minute mark. From the transcript
And it turns out, for reasons we'll explore in more detail next week, it is not sufficient to do what we did before and do something like this if I'm searching for "Ron." It turns out that in C, you can't use equals equals to compare two strings. You can for an int, you can for a char. And we've done both of those in the past. But there's a subtlety that we'll dive into in more detail next week that means you can't actually do this.
And this is curious, because if you have prior programming experience in languages like Python or the like, you can do this. So in C you can't, but we'll see next time why. But for now, it turns out that C can solve this problem, and historically the way you do this is with a function.
So inside of the string.h header file, there is not only a declaration for strlen, the length of a string like last week. There's another function called strcmp. And "stir compare," for short, S-T-R-C-M-P, allows me to pass in two strings, one string that I want to compare against another string.
Spoiler: The technical reason is that strings are actually pointers, which is to say addresses. string == string will compare the addresses, not the data at those addresses.