首页 > 代码库 > 字符串以0为结束标志

字符串以0为结束标志

1     char pp[100];2     char *kl = pp;3     strcpy(kl,"23456");4     kl += 7;5     strcpy(kl,"abcde");      //this will not show,because 0 is before them6     cout << pp << "33" << endl;7     //cout << pp+7 << "33" << endl;

 

字符串以0为结束标志