当前位置:网站首页>C语言左值和右值说明[通俗易懂]
C语言左值和右值说明[通俗易懂]
2022-07-25 21:43:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
左值:用于标定特定数据对象的名称或表达式。
这里的数据对象指的是数据存储区域。与C++的面对对象的对象是有区别的。
所以,左值表示引用内存中的地址。
但是有些变量不能修改内存中的值,比如使用了const限定符创建的变量。为了与这些变量区分,把可修改的对象称为可修改的左值。
因此赋值运算符=的左边应该是可修改的左值。
右值:能赋值给可修改左值的量。右值不能是左值本身。右值可以是常量、变量、表达式或函数返回值等。
例如
year = 2020;这里year是可修改的左值,而2020是可修改的右值。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/127919.html原文链接:https://javaforall.cn
边栏推荐
- 【饭谈】Web3.0到来后,测试人员该何去何从?(十条预言和建议)
- Pyqt5 use pyqtgraph to draw multiple y-value scatter plots
- mysql8.0 mha实现高可用《mha》
- Research: more than 70% of doctors are still prescribing unsafe antibiotic drugs
- PE format: analyze and implement IATHOOK
- Isn't it too much to play Gobang in idea?
- Protobuf的简单使用
- Job interviews are always a second kill? After reading the seckill system notes secretly stored by JD T8, I have given my knees
- [leetcode ladder] linked list · 876 find the middle node of the linked list
- 919. Complete binary tree inserter: simple BFS application problem
猜你喜欢

Oracle RAC RMAN backup error ora-19501 ora-15081

FAW red flag "King fried" is listed, which is safe and comfortable
![[MAIXPY]kpu: load error:2005, ERR_ READ_ File: read file failed problem solving](/img/0b/da67b5a361a2cdfaf81568d34cf5f7.png)
[MAIXPY]kpu: load error:2005, ERR_ READ_ File: read file failed problem solving

Performance debugging -- chrome performance

Apple estimates that iPhone will give up the Chinese market, and the Chinese industrial chain needs to consider living a hard life
![[interview: concurrent Article 23: multithreading: Join] re understanding of join](/img/ee/5160a55e776336ba844abe8e9db72a.png)
[interview: concurrent Article 23: multithreading: Join] re understanding of join

How to implement distributed locks with redis?

Creation and destruction of function stack frames

【面试:并发篇23:多线程:join】join再理解

CNN structural design skills: taking into account speed accuracy and engineering implementation
随机推荐
Handwriting distributed configuration center (1)
mysql8.0 mha实现高可用《mha》
PHP zero time task, PHP laravel time task schedule [dry goods]
ES6 -- Deconstruction assignment
How will Web3 change the future of people?
Reading the pointpillar code of openpcdet -- Part 3: Calculation of loss function
Guys, how can Flink SQL submit tasks in per job mode?
[leetcode ladder] linked list · 876 find the middle node of the linked list
My heart's broken! After being cheated by 30000, a 16-year-old girl was unconvinced and cheated by 50000
Is there any document for synchronizing from Oracle to ODPs?
【饭谈】软件测试薪资层次和分段(修仙)
2022 latest examination questions and answers of eight members (standard staff) of Shanghai Architecture
五、品达通用权限系统__pd-tools-xxs(防跨站脚本攻击)
开源协议是否具有法律效力?
【饭谈】如何设计好一款测试平台?
Idea resolves the prompt of profile properties disappear
Pyqt5 use pyqtgraph to draw multiple y-value scatter plots
Trusted and controllable way of Tencent cloud database
C#常见的集合
Talk about what's going on with C # backstage GC?