/*
输入
无
输出
字符串长度和字符数组占用空间数
程序输出 11,17 */
#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int main(){
char s[]="a1\t\0527c\28\"\x4g\0de\8\0";
printf("%d,%d\n",strlen(s),sizeof(s));
return 0;
}
/*
输入
无
输出
字符串长度和字符数组占用空间数
程序输出 11,17 */
#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int main(){
char s[]="a1\t\0527c\28\"\x4g\0de\8\0";
printf("%d,%d\n",strlen(s),sizeof(s));
return 0;
}