#include <stdio.h>
void fun1(void)
{
char readbyte = 0;
char temp = 0;
readbyte = 0x93;
printf("------------------fun1
");
if(readbyte & 0x80)
{
printf("aaaaaaaaaaaaaaaa
");
readbyte = 0xc7;
temp = readbyte & 0x38;
printf("temp: %x
", temp);
if(readbyte & 0x38 == 0x38)
{
printf("bbbbbbbbbbbbbbbbbbbb
");
}
else
{
printf("cccccccccccccccccc
");
}
}
}
void fun2(void)
{
char readbyte = 0;
char temp = 0;
readbyte = 0x93;
printf("------------------fun2
");
if(readbyte & 0x80)
{
printf("aaaaaaaaaaaaaaaa
");
readbyte = 0xc7;
temp = readbyte & 0x38;
printf("temp: %x
", temp);
if(temp == 0x38)
{
printf("bbbbbbbbbbbbbbbbbbbb
");
}
else
{
printf("cccccccccccccccccc
");
}
}
}
int main(void)
{
fun1();
fun2();
return 0;
}
请看比较的if那里. fun1 fun2函数打印的结果不一样/
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
一周热门 更多>