0
[SOLVED] How is it 0 here? I thought it must be 1 cause they look the same each other. Is the problem length of the strings?
char a[]="tashkent"; char b[9]="tashkent"; cout<<(a==b);
2 Answers
+ 3
Check this ,
https://stackoverflow.com/questions/3933614/using-the-equality-operator-to-compare-two-strings-for-equality-in-c
It is basically comparing pointers .