字符数组与指针

#include<iostream>
using namespace std;
int main()
{char *p="ilovechina";
 cout<<p<<endl;//输出"ilovechina";
 cout<<*p<<endl;//输出'i';
 return 0;
}
posted @ 2012-12-22 11:45  _一千零一夜  阅读(88)  评论(0编辑  收藏  举报