#include <iostream>
#include <string>
using std::cin;
using std::cout;
using std::endl;
#include <string>
using std::cin;
using std::cout;
using std::endl;
using std::string;
int main()
{
const size_t arr_size=10;
char a1[arr_size]={'a','b'};
char a2[arr_size]="hello";
char *a3=a1;
cout<<*(a1+1)<<std::endl;
cout<<a2[1]<<std::endl;
cout<<*a3[1]<<std::endl;
cout<<a3<<endl;
}
输出结果是:
b
e
b
ab