1 #include <cstring> 2 #include <iostream> 3 using namespace std; 4 5 int main(){ 6 char testArray[] = "abcd ef gh i 123 "; 7 cout <<"输入的字符串:"<<testArray <<endl; 8 9 char *p = testArray; 10 char *q = p; 11 while(*p != '
1 #include <cstring> 2 #include <iostream> 3 using namespace std; 4 5 int main(){ 6 char testArray[] = "abcd ef gh i 123 "; 7 cout <<"输入的字符串:"<<testArray <<endl; 8 9 char *p = testArray; 10 char *q = p; 11 while(*p != '