摘要:
1 #include <iostream> 2 using namespace std; 3 int main() { 4 char s1[] = "Hello World"; //字母10位,空格1位,结尾'\0'占一位 5 char *s2 = "Hello World"; //一个指针占4位 阅读全文
摘要:
1 #include 2 using namespace std; 3 int main() { 4 char s[] = "Hello World"; 5 // char *s = "Hello World"; //指针型*s同样适用 6 7 for (int i = 0; i != 11; ++i) { 8 cout << s[i];... 阅读全文