字符指针操作


#include "iostream.h"
void main()
{
 
 char *str[]={"what","up","factory","hellogirl"};
 char **p=str+1;
        str[0]=(*p++)+2;
 str[1]=*(p+1);
 str[2]=p[1]+3;
 str[3]=p[0]+(str[2]-str[1]);

 cout<<str[0]<<endl;
 cout<<str[1]<<endl;
 cout<<str[2]<<endl;
 cout<<str[3]<<endl;
}

你可能感兴趣的:(字符指针操作)