直接看代码 #include <stdio.h> #include<string.h> int main() { //char s[10] = { 98,68,55,'-','x','y' }; // sizeof=10 strlen =6 //char s[10] = "abc%78"; // 从常量区拷贝赋值,sizeof=