#include<stdio.h>
#include<stdio.h>
void main()
{
static char x[]="12345";
static char y[]={'1','2','3','4','5'};
printf("x=%d y=%d",strlen(x),strlen(y));
return 0;
}
[此贴子已经被作者于2016-7-5 12:53编辑过]
#include<stdio.h> #include<string.h> int main() { static char x[ ]="string"; char y[ ]={'1','2','3','4','5'}; printf("x=%d y=%d",strlen(x),strlen(y)); return 0; }
[此贴子已经被作者于2016-7-5 13:41编辑过]