字符串大小
strlen对char b[ ] = { ‘a’,‘b’,‘c’};不知道 ’\0‘在哪里,读取的是一个字符串
#include <iostream>
using namespace std;
int main()
{
char a[] = { "abcde" };
char b[] = { 'a','b','c'};
cout << sizeof(a)/sizeof(a[0]) << endl;//6
cout << strlen(a) << endl;//5
cout << sizeof(a) << endl;//6
cout << "**************" << endl;
cout << a[1] << endl;
cout << b[2] << endl;
cout << "**************"<< endl;
cout << sizeof(b) / sizeof(b[0]) << endl;//3
cout << strlen(b) << endl;//乱码
cout << sizeof(b) << endl;//3
}