字符串的计算

//字处理,多媒体
//’\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;

}
*/

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值