技术的乐趣在于分享,欢迎多多交流,多多沟通。
全部博文(877)
分类: 嵌入式
2014-09-27 14:29:32
//test for strlen sizeof
#include
int main(int argc, char *argv[])
{
int val = 037;
unsigned char chr[] = "丁";
char str[] = "var";
printf("%x",chr[0]);
printf("%x",chr[1]);
printf("hello wor/\
ld!\n");
printf("The num is : %d\n", 037);
printf("The num is : %x\n",sizeof str);
printf("strlen is : %d\n",strlen(str));
return 0;
}