字符串比较,请给出输出结果
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
#include <iostream>
using namespace std ;
int main(void)
{
const char s1[] = "abcd" ;
const char s2[] = "abcd" ;
const char *s3 = "abcd" ;
const char *s4 = "abcd" ;
char* const s5 = "abcd" ;
char* const s6 = "abcd" ;
char* s7 = "abcd" ;
char* s8 = "abcd" ;
cout << (s1 == s2) << endl ;
cout << (s3 == s4) << endl ;
cout << (s5 == s6) << endl ;
cout << (s7 == s8) << endl ;
system("pause") ;
return 0 ;
}
// output: 0 1 1 1