As you guys see I had assigned both of these arrays with the same character in the same index.
#include <iostream>
using namespace std;\
main(){
char a[10] = {0};
char b[10] = {0};
int x;
for(x=0; x<10 ;x++){
cout << a[x] << " ";
}
for(x=0; x<10 ;x++){
cout << b[x] << " ";
}
for(x=0; x<4 ;x++){
a[x]='A';
}
for(x=0; x<4 ;x++){
b[x]='A';
}
if(a == b)
cout << "aaaa";
return 0;
}
But both of these arrays are not equal to each other. What did I miss or misunderstood?