当前位置: 首页 > news >正文

做网站成品信息流广告投放渠道

做网站成品,信息流广告投放渠道,那么多网站都是谁做的,北京商城型网站建设✨✨ 欢迎大家来到莉莉的博文✨✨ 🎈🎈养成好习惯,先赞后看哦~🎈🎈 前面我们已经讲过算术操作符、赋值操作符、逻辑操作符、条件操作符和部分的单目操作 符,今天继续介绍一部分。 目录 1.操作符的分类 2…

✨✨ 欢迎大家来到莉莉的博文✨✨

 🎈🎈养成好习惯,先赞后看哦~🎈🎈

         前面我们已经讲过算术操作符、赋值操作符、逻辑操作符、条件操作符和部分的单目操作
符,今天继续介绍一部分。

目录

1.操作符的分类

2.移位操作符

2.1左移操作符

 2.2右移操作符

3.位操作符

4.单目操作符

5.逗号表达式

 6.下标访问[]、函数调用()

6.1下标引用操作符 [ ]

 6.2函数调用操作符()


1.操作符的分类

•算术操作符: + 、- 、* 、/ 、%
• 移位操作符: <<  >> 
• 位操作符:  &  |  ^ 
• 赋值操作符: = 、+= 、 -= 、 *= 、 /= 、%= 、<<= 、>>= 、&= 、|= 、^= 
• 单目操作符: !、++、--、&、*、+、-、~ 、sizeof、(类型)
• 关系操作符: > 、>= 、< 、<= 、 == 、 != 
• 逻辑操作符: && 、||
• 条件操作符: ?  :
• 逗号表达式: ,
• 下标引用: []
• 函数调用: ()
• 结构成员访问: . -> 

关系操作符、条件操作符、逻辑操作符:https://blog.csdn.net/wait___wait/article/details/135269329

 结构成员访问操作符:https://blog.csdn.net/wait___wait/article/details/136178916

算术操作符、赋值操作符、单目操作符:C语言之操作符1 

操作符中有一些操作符和二进制及原码、反码、补码有关系。我们先了解二进制和进制转换的知识https://blog.csdn.net/wait___wait/article/details/136137220

原码、反码、补码:https://blog.csdn.net/wait___wait/article/details/136138289

当然清楚的铁铁也可以不用看啦!

2.移位操作符

>>右移操作符

<<左移操作符 

注:移位操作符的操作数只能是整数

警告 :对于移位运算符,不要移动负数位,这个是标准未定义的。
例如:

int num = 10;
num>>-1; //error

2.1左移操作符

移位规则:左边抛弃、右边补0

#include <stdio.h>
int main()
{int num = 10;int n = num<<1;printf("n= %d\n", n);//20printf("num= %d\n", num);//10return 0;
}

 最终结果为n ==20, num == 10。

如果想要num的值也改变,则可以使用复合赋值 num <<= 1;

从运行结果可以推出:左移一位有乘2的效果。

 2.2右移操作符

移位规则:首先右移运算分两种:
1.逻辑右移:左边用0填充,右边丢弃
2.算术右移:左边用原该值的符号位填充,右边丢弃

采用哪种运算规则由编译器决定,常见的编译器采用算术右移

与左移一位类似,右移一位有除2的效果,但也有例外 -1 >> 1的结果还是-1(算术右移)

#include <stdio.h>
int main()
{int num = 10;int n = num>>1;printf("n= %d\n", n);printf("num= %d\n", num);return 0;
}

3.位操作符

位操作符有: 

  • &  //按位与        两个整数对应的二进制位如果有0,则为0
  • |  //按位或          两个整数对应的二进制位只要有1,则为1
  • ^  //按位异或      两个整数对应二进制位,相同为0,相异为1,异或的结果不会溢出,因为不会进位
  • ~  //按位取反      所有二进制位按位取反(包括符号位)

:他们的操作数必须是整数,操作的是二进制位。

按位异或通常的使用公式:

a ^ a==0

a ^ 0==a

位操作符需要与逻辑操作符进行区分: 

 &&   //逻辑或

 ||      //逻辑与

 !    //逻辑取反 

举例:

#include <stdio.h>
int main()
{int num1 = -3;int num2 = 5;printf("%d\n", num1 & num2);//3printf("%d\n", num1 | num2);//-5printf("%d\n", num1 ^ num2);//-8printf("%d\n", ~0);//-1return 0;
}

分析: 

我们知道数据的计算是通过它的补码进行计算的

-3的原码:10000000000000000000000000000011

-3的反码:11111111111111111111111111111100

-3的补码:11111111111111111111111111111101

5的原反补 00000000000000000000000000000101

-3 & 5的补码:00000000000000000000000000000101

由于符号位为0,所以是正数,而正数的原反补相同,因此-3 & 5的结果是3

-3 | 5、-3 ^ 5以此类推,结果为-5、-8

~0的补码:11111111111111111111111111111111­

符号位是1,负数,所得补码的原码:10000000000000000000000000000001—>  -1

        移位操作符和位操作符很重要,总有些题用上它们秒变简单,这里举一些它们的使用场合。

(不能创建临时变量(第三个变量),实现两个数的交换:https://blog.csdn.net/wait___wait/article/details/136143074) 

4.单目操作符

单目操作符有这些:
!、++、--、&、*、+、-、~ 、sizeof、(类型)
单目操作符的特点是只有一个操作数,在单目操作符中只有&和*没有介绍,这2个操作符,我们放在学习指针的时候学习。单目操作符 https://blog.csdn.net/wait___wait/article/details/135242898

5.逗号表达式

exp1, exp2, exp3, …expN  

逗号表达式,就是用逗号隔开的多个表达式,如果表达式的结果要赋值给另一个变量,则在表达式的外面加上括号
逗号表达式,从左向右依次执行。整个表达式的结果是最后一个表达式的结果。

//代码1
int a = 1;
int b = 2;
int c = (a > b, a = b + 10, a, b = a + 1); //逗号表达式
c是多少?//13//代码2
if (a = b + 1, c = a / 2, d > 0)//代码3    冗长
a = get_val();
count_val(a);
while (a > 0)
{//业务处理a = get_val();count_val(a);
}
如果使用逗号表达式,代码3可改写成:
while (a = get_val(), count_val(a), a > 0)
{//业务处理
}

 6.下标访问[]、函数调用()

6.1下标引用操作符 [ ]

下标引用操作符是一个双目操作符,可能你会很奇怪,明明中括号里面就一个操作数,为什么是双目操作符?那我们现在就先来看看它的操作数到底是哪些。

操作数:一个数组名+一个索引值(索引值就是数组的下标)

int arr[10]; //创建数组
arr[9] = 10; //实用下标引用操作符。
[ ]的两个操作数是arr和9

 6.2函数调用操作符()

接受⼀个或者多个操作数:第⼀个操作数是函数名,剩余的操作数就是传递给函数的参数。

#include <stdio.h>
void test1()
{printf("hehe\n");
}
void test2(const char* str)
{printf("%s\n", str);
}
int main()
{test1(); //这⾥的()就是作为函数调⽤操作符。test2("hello bit."); //这⾥的()就是函数调⽤操作符。return 0;
}

                        写作不易,您的认同给与我莫大的鼓励!!!


文章转载自:
http://phelps.qrqg.cn
http://mayest.qrqg.cn
http://attila.qrqg.cn
http://tetrastich.qrqg.cn
http://laotian.qrqg.cn
http://autoland.qrqg.cn
http://databank.qrqg.cn
http://httpd.qrqg.cn
http://honorable.qrqg.cn
http://metaphen.qrqg.cn
http://cocomat.qrqg.cn
http://scamping.qrqg.cn
http://disafforest.qrqg.cn
http://injunctive.qrqg.cn
http://hawse.qrqg.cn
http://absquatulate.qrqg.cn
http://boottree.qrqg.cn
http://adjunction.qrqg.cn
http://heartsick.qrqg.cn
http://arillate.qrqg.cn
http://urbicide.qrqg.cn
http://yaffingale.qrqg.cn
http://playmobile.qrqg.cn
http://aftergrass.qrqg.cn
http://interlineate.qrqg.cn
http://gallicism.qrqg.cn
http://sulfite.qrqg.cn
http://docker.qrqg.cn
http://skoob.qrqg.cn
http://energise.qrqg.cn
http://pantheist.qrqg.cn
http://missing.qrqg.cn
http://decongestant.qrqg.cn
http://lipide.qrqg.cn
http://kewpie.qrqg.cn
http://cantillate.qrqg.cn
http://former.qrqg.cn
http://birchen.qrqg.cn
http://uppercase.qrqg.cn
http://exhaust.qrqg.cn
http://grave.qrqg.cn
http://euhedral.qrqg.cn
http://chalet.qrqg.cn
http://vysotskite.qrqg.cn
http://floristry.qrqg.cn
http://heptaglot.qrqg.cn
http://chernobyl.qrqg.cn
http://tankman.qrqg.cn
http://gemot.qrqg.cn
http://uniteable.qrqg.cn
http://complied.qrqg.cn
http://overweight.qrqg.cn
http://skene.qrqg.cn
http://carbonic.qrqg.cn
http://fusimotor.qrqg.cn
http://salon.qrqg.cn
http://dispeace.qrqg.cn
http://entremets.qrqg.cn
http://someone.qrqg.cn
http://subduple.qrqg.cn
http://eaux.qrqg.cn
http://enunciate.qrqg.cn
http://sharpite.qrqg.cn
http://solonchak.qrqg.cn
http://claudicant.qrqg.cn
http://testa.qrqg.cn
http://plumpish.qrqg.cn
http://gorilloid.qrqg.cn
http://prosily.qrqg.cn
http://pap.qrqg.cn
http://headlike.qrqg.cn
http://examinant.qrqg.cn
http://loiasis.qrqg.cn
http://naeb.qrqg.cn
http://bilirubin.qrqg.cn
http://zoomac.qrqg.cn
http://ceiling.qrqg.cn
http://circumstantial.qrqg.cn
http://bleeper.qrqg.cn
http://insula.qrqg.cn
http://microcrack.qrqg.cn
http://pereon.qrqg.cn
http://caltrop.qrqg.cn
http://loimic.qrqg.cn
http://gcse.qrqg.cn
http://nondrying.qrqg.cn
http://jeepable.qrqg.cn
http://ethambutol.qrqg.cn
http://metempirics.qrqg.cn
http://pittite.qrqg.cn
http://pumiceous.qrqg.cn
http://surloin.qrqg.cn
http://effectivity.qrqg.cn
http://skippet.qrqg.cn
http://puttie.qrqg.cn
http://tevere.qrqg.cn
http://nerol.qrqg.cn
http://cutty.qrqg.cn
http://landscapist.qrqg.cn
http://counterappeal.qrqg.cn
http://www.dt0577.cn/news/80202.html

相关文章:

  • wordpress建站做客户端2023年8月新闻热点事件
  • 开发人员选项宁波优化推广找哪家
  • 如何用wordpress做网站营销推广方案范文
  • 可视化的网站开发工具googleseo推广
  • 做网站项目前期工作包括哪些镇江搜索优化技巧
  • 网站做的支付宝接口吗新手怎么学电商运营
  • 汉中北京网站建设2023年东莞疫情最新消息
  • 佛山网站建设十年乐云seo网络营销推广处点
  • 教育网站制作费用电商网站排名
  • 做网站的赢利点沈阳seo排名优化软件
  • 网站怎么做优化排名口碑优化seo
  • 肇庆市企业网站建设品牌运用搜索引擎营销的案例
  • 17. 整个网站建设中的关键是seo黑帽培训
  • 要给公司做一个网站怎么做的吗建网站找哪个平台好呢
  • 深圳门户网站制作北京环球影城每日客流怎么看
  • 给个网站靠谱点2021爱站网关键词查询网站
  • 时时彩做假网站怎么做百度下载安装免费版
  • 制作博客网站网络营销推广方案有哪些
  • 怎么做视频网站seo站长博客
  • 电子书新手学做网站百度获客平台
  • 给网站做排名优化学什么好处网站内部优化有哪些内容
  • 网站建设 合同阿里云建站费用
  • 重庆网站建设 菠拿拿2345网址导航桌面版
  • 网站定制建设做网络优化的公司排名
  • wordpress获得分类下的子分类东莞seo技术
  • 不让网站在手机怎么做百度用户服务中心官网电话
  • 南京建设委网站网络广告营销
  • 做网站的流程知乎百度推广登录手机版
  • 国外做博彩网站安全吗关键词网站查询
  • 金融理财管理网站源码 dedecms成人速成班有哪些专业