sizeof和strlen区别

1 #include <iostream>
2 using namespace std;
3 int main(int argc, char *argv[])
4 {
5     cout << sizeof("goodbye") << endl;
6     cout << strlen("goodbye") << endl;
7     return 0;
8 }

输出:

8

7

原文地址:https://www.cnblogs.com/autumoonchina/p/3565365.html