请教它们的区别


请问它们的区别
 #if (CUSTOMERIZATION==AAA | CUSTOMERIZATION==BBB)


 #if (CUSTOMERIZATION==AAA || CUSTOMERIZATION==BBB)


请问以上二句, 它们的区别


想实现 或功能  #if ((CUSTOMERIZATION==AAA) or (CUSTOMERIZATION==BBB))


应哪个正确呢

c语言 基本概念 程序开发

风流倜傥白毛君 11 years, 2 months ago

会逻辑短路


但也许是作者笔误

不科学D复制君 answered 11 years, 2 months ago

不会逻辑短路,

Nihil answered 11 years, 2 months ago

个人意见:最大的区别在于

真黑黑黑黑 answered 11 years, 2 months ago

 1

但逻辑不一样,一个是bit与,一个是逻辑与。

Gabby answered 11 years, 2 months ago

 1 == 1 

dgwnb answered 11 years, 2 months ago

 0


clabb answered 11 years, 2 months ago

 0 == 1 

天涯SAMA answered 11 years, 2 months ago

 1


我没有神ID啦 answered 11 years, 2 months ago

 1 == 0 

wgf4242 answered 11 years, 2 months ago

 0


其实我是椰子 answered 11 years, 2 months ago

 0 == 0 

拉拉miko answered 11 years, 2 months ago

的结果刚好一样,即


orkid answered 11 years, 2 months ago

恰好也对

因为==产生1或者0

对于1和0来说,

momika answered 11 years, 2 months ago

Your Answer