当前位置:网站首页>Xiaolu Inn - Trailer
Xiaolu Inn - Trailer
2022-07-29 05:21:00 【Xiaolu Inn】
Introduce
Prospective senior students , At present, Shenzhen “ Man on man ”, A migrant worker who tries to explain what he understands with the most accessible examples . At present, it is tentatively scheduled to precipitate for half a year, that is to say, it will only be serialized for half a year , Mainly record and share their daily precipitation of knowledge , Currently includes C/C++、QT、 Embedded software GUI design idea . Someone may ask why it is half a year , Because the current internship time is half a year , Then if the middle is dismissed for various reasons, the serial may also be terminated ...
Purpose
On the one hand, it's easier to find a job with your own personal blog. After all, it's a bonus ; On the other hand, I am really precipitating something , There is real calmness to study something , Maybe it's nothing in the eyes of some technical bulls ... But I think the real learning is not self understanding , But you can make it clear to others , So with the current blog serialization .
A trial lecture
Now it's a c Linguistic *a and &a Explanation of a typical problem of , The following explanation style is the style in the subsequent serial blog . If the following style cannot be accepted, there is no need to read the following blog ...
about C Linguistic * and & Maybe a lot of people know *a It means a pointer ;&a Express a The address of ; Then you can start to run it at this time , The following code :int a=10;int *b=&a;printf("&d\n",&a);printf("&d\n",*b)
After reading the output , If you know enough, you may not feel anything , But if you don't know enough, you may fall into doubt , Why are the results of the two different .
First of all, we need to understand the variable a The essence of , It is a storage unit , The storage unit itself is used as a container to store Something Also have their own identification , there Something It's called data , identification Called address . in other words a It can be either an address or a data , So how to determine the result of the visit when you visit ? That's all C The rules of language , stay C Specified in the language a According to the data 、&a Address .
Then let's see * a, Here is the stored a Medium Stored address Corresponding Storage unit Of data , That is to say : The current residence address of the wanted person I reported to the police is XX apartment 805 room , The place I report to the police here is equivalent to * a, I told the police the address , But is it the house of the address that the police want to catch ? Not at all , It's the person in the address that needs to be caught .
Then we are looking at the code snippet above , * b=&a, What I got here is a The address of , The final output * b The output is a Content, not a The address of , It's like the police arresting people , It's people to catch, not the house represented by the address . So the final printf(“&d\n”,&a) Output is a a Address , and printf(“&d\n”,*b); The output is a The content of .
Last
If you feel that the above trial lecture is understood and interested, you also want , I hope you can use your hands to pay attention , Follow up blog can also pay more attention , thank .
边栏推荐
猜你喜欢

C语言求字符串的长度

CMU15-213 Malloc Lab实验记录

Scikit learn -- steps and understanding of machine learning application development

Deep learning brush a bunch of tricks of SOTA

Xiaobai high salary shortcut Qt development game Snake

Google GTEST event mechanism

法线可视化

QT系列---安装

ARFoundation入门教程7-url动态加载图像跟踪库

MySQL many to many relationship, grouping and splicing to query multiple data to one data
随机推荐
TCP三次握手四次挥手
开区网站打开自动播放音乐的添加跟修改教程
C language handwritten qq-ai version
Mysql把查询到的结果集按指定顺寻进行排序
Xiaobai high salary shortcut Qt development game Snake
7.1-default-arguments
Mysql语句中的函数
C 语言手写 QQ-AI 版
Apache POI实现Excel导入读取数据和写入数据并导出
Handwritten student management system
【[第一次写博客]Uda课程中的P控制器实现说明】
Mysql的自连接和联合查询
使用Jstack、Jconsole和jvisualvm进行死锁分析
Architecture analysis of three-tier project and parameter name injection of construction method
直播预告|如何节省30%人工成本,缩短80%商标办理周期?
Functions in MySQL statements
开源汇智创未来 | 2022开放原子全球开源峰会 openEuler 分论坛圆满召开
缓存穿透、缓存击穿、缓存雪崩以及解决方法
直播预告|如何通过“智能边缘安全”提升企业免疫力?
How to get command parameters in Visual Basic.Net