C语句常见的错误:
1)
printf("%f\n",10/3);
printf("%f\n",(duoble)10/3);
printf("%f\n",(duoble)(10/3));
输出结果:0.000000
3.333333
3.000000
2)
char *str = "abcdef";
*str = 'x';
编译错误:原因此字符串数据存于只读段中,不能改变
C语句常见的错误:
1)
printf("%f\n",10/3);
printf("%f\n",(duoble)10/3);
printf("%f\n",(duoble)(10/3));
输出结果:0.000000
3.333333
3.000000
2)
char *str = "abcdef";
*str = 'x';
编译错误:原因此字符串数据存于只读段中,不能改变