标签:
#include <stdio.h>
#include <string.h>
main()
{
char str[10]={‘h‘,‘e‘,‘\0‘,‘l‘,‘l‘,‘o‘};//"hello"
printf("string length: %ld,and string is %s\n",strlen(str),str);
for(i=0;i<11;i++)
{
printf("[index:%d]%c\n",i,str[i]);
}
}
标签:
原文地址:http://www.cnblogs.com/htmlphp/p/4872732.html