2021 iThome 鐵人賽
分享至
Truth TableLet A and B be two Boolean variables.
Then the truth table for logical operators is as follows:
Arithmetic Compound Assignment Operators
EX1:
EX2:
比較++x & x++的差異++x 是先加值到x,再傳回y,所以x=1+1=2=y.x++ 是先傳值給y, x再加值,所以x=1=y,x+1=2.這兩個很容易搞混!必須注意!
IT邦幫忙