#include <iostream>
usingnamespace std;
int main()
{
char word1[]="hello",word2[]="hello"if(word1==word2)
cout<<"word1 equals word2";
else
cout<<"word1 does not equal word2";
}
The output is "word1 does not equal word2". Is this because the if statement is checking to see if the addresses of the arrays are equal, and not the actual content of the arrays?