字符串的计算

//字处理,多媒体
//’\0’,‘0’,0,“0”
//0 48 9 字符串
//字符串:利用“”包括起来的一系列字符。字符串的末尾有个’\0’,
//’\0’是字符串结尾标记,如果没有’\0’则不是字符串
//assert(表达式):断言,如果表达式为真则什么都不做,为假则程序崩溃,并报告原因和位置

/*
void Fun(int *p)
{
p = NULL;
}

int main()
{
int a = 10;
int *p = &a;
//p = NULL;
Fun§;
printf("%d\n",*p);

return 0;

}
*/
//str1 = str2;

#if 0
#endif

/*
int main()
{
int *p = (int )0x2010;
printf("%x\n",p-2);//2008
printf("%x\n",(char
)p-2);//
printf("%x\n",(short *)p-2);//200c
printf("%x\n",(double )p-2);//2008
printf("%x\n",(char
)p-2);//2008
printf("%x\n",(float *)p-2);//2008
printf("%x\n",(unsigned long)p-2);//200e

return 0;

}
*/

/*
int main()
{
int *p = (int *)1000;
//*p = 10;//error
printf("%d\n",p+4);//1016
printf("%d\n",(char *)p+4);//1004
printf("%d\n",(short *)p+4);//1008
printf("%d\n",(double *)p+4);//1032
printf("%d\n",(unsigned long *)p+4);//1016
printf("%d\n",(int ***)p+4);//1016
printf("%d\n",(long long)p+4);//1004

return 0;

}
*/

猜你喜欢

转载自blog.csdn.net/weixin_43407577/article/details/83628325