摘要:
c-逗号运算符 使用逗号运算符是为了把几个表达式放在一起。 整个逗号表达式的值为系列中最后一个表达式的值。 值4=(值1,值2,值3);//值4=值3,运算顺序从左到右 #include <stdio.h> int main(){ int a = 1; int b = 2; int c = 3; i 阅读全文
posted @ 2022-01-10 14:49
programmer-lite
阅读(75)
评论(0)
推荐(0)
摘要:
1.移位操作符 <<左移: a=b<<n a=b乘以2的n次方 >>右移: a=b>>n a=b除以2的n次方 简单理解: #include <stdio.h> int main(){ int a = 200; int b = a << 3;//a乘以2的3次方 int c = a >> 2;//a 阅读全文
posted @ 2022-01-10 14:48
programmer-lite
阅读(160)
评论(0)
推荐(0)