当前位置:网站首页>Arithmetic operations and expressions
Arithmetic operations and expressions
2022-06-25 14:46:00 【m0_ fifty-nine million nine hundred and forty-nine thousand fou】
The associativity of operators : The combination direction from right to left becomes “ Right binding ”.

Self increasing 、 Self - subtracting operator :
#include<stdio.h>
void main()
{
int i = 8;
printf("%d\n", ++i);
printf("%d\n",--i);
printf("%d\n", i++);
printf("%d\n", i--);
printf("%d\n", -i++);
printf("%d\n", -i--);
}
#include<stdio.h>
void main()
{
int i = 5, j = 5, p, q;
printf("%d\n,%d\n", i++, ++i);
printf("%d\n,%d\n", ++i, i++);
p = (i++) + (i++) + (i++);
q = (++j) + (++j) + (++j);
printf("%d,%d,%d,%d", p, q, i, j);
}Execution results :
6
,7
9
,7
27,24,12,8 Need later understanding
Type conversion
#include<stdio.h>
void main()
{
int a, b = 322;
float x, y = 8.8;
char c1 = 'k', c2;
a = y;
x = b;
a = c1;
c2 = b;
printf("%d,%f,%d,%c", a, x, a, c2);
} Execution results : Loss accuracy 
#include<stdio.h>
void main()
{
int a = 2, b = 4, c = 6, x, y;
y = (x = a + b), (b + c);
printf("y=%d,x=%d", y, x);
}Execution results :y=6,x=6
边栏推荐
- Custom instruction, mixing, routing, lifecycle
- Heavyweight! The domestic IDE is released and developed by Alibaba. It is completely open source! (high performance + high customization)
- Jaspersoft studio installation
- One time summary: 64 common terms for data analysis!
- 有哪个瞬间让你觉得这个世界出bug了?
- Golang project dependency management tool go vendor, go Mod
- 买基金在哪里开户安全?求指导
- Where is it safe to open an account for buying funds? Ask for guidance
- 分享自己平時使用的socket多客戶端通信的代碼技術點和軟件使用
- Report on Hezhou air32f103cbt6 development board
猜你喜欢

Page 112 machine learning - review of fundamentals of mathematics pptx

第一次读 “Clean” 系列,并没有觉得这是一本多好的书
![[untitled]](/img/7f/e2c9fbfb5eb6e7fcc6e23a46540933.jpg)
[untitled]

Reading the "clean" series for the first time, I didn't think it was a good book

oracle数据库常用的函数总结
![[untitled] the CMD command window displays' NPM 'which is not an internal or external command](/img/db/b1ae4b0d1110af1e24887ba3b4fe16.jpg)
[untitled] the CMD command window displays' NPM 'which is not an internal or external command

JS recursion and while

Report on Hezhou air32f103cbt6 development board

Why should programmers be softer?

电源自动测试系统NSAT-8000,精准高速可靠的电源测试设备
随机推荐
【HBZ分享】LockSupport的使用
从408改考自主命题,211贵州大学考研改考
中国电池技术取得重大突破,日韩美都落后了,中国巩固了领先优势
Power automatic test system nsat-8000, accurate, high-speed and reliable power test equipment
2022年广东高考分数线出炉,一个几家欢喜几家愁
JGG | overview of duhuilong group of Hebei University Research on plant pan genomics
Summary of common functions in Oracle Database
Biscuit distribution
What moment makes you think there is a bug in the world?
15 -- 最接近原点的 K 个点
2020-03-20
Shell array
有哪个瞬间让你觉得这个世界出bug了?
None of the MLIR optimization passes are enabled (registered 2) solutions
dmsetup命令
Which is better and safer, GF easy gold rush or flush
Add the resources directory under test in idea
In 2022, the score line of Guangdong college entrance examination was released, and several families were happy and several worried
HMS Core机器学习服务实现同声传译,支持中英文互译和多种音色语音播报
H5 page graying source code, ie compatible (elegant downgrade provides download browser link)