当前位置:网站首页>[embedded C foundation] Part 9: basic usage of C language pointer
[embedded C foundation] Part 9: basic usage of C language pointer
2022-07-28 13:01:00 【Black cat senior】
1 summary
Address :
The number that distinguishes different memory spaces is called address
The pointer :
The pointer is the address , The address is the pointer
Pointer to the variable :
Variables that store pointers are called pointer variables
32bit Operating system , Pointer 4 byte ;
64bit Operating system , Pointer 8 byte
1.1 Definition of pointer
int *p; //p There's an address in it ,p Itself is a pointer variable
char *p;
float *p;
1.2 Pointer operated variable
There are two ways to manipulate variables :
1. Direct access
Use variable names to access
2. Indirect access to
Use pointers to access
&: Fetch address operator
*: Take the space operator
1.3 The arithmetic operation of the pointer
+
-
++: Pointer to memory high address offset points to data type space size bytes
--: Pointer to memory low address offset points to data type space size bytes
Example :
边栏推荐
- [graduation design teaching] ultrasonic ranging system based on single chip microcomputer - Internet of things embedded stm32
- Science heavyweight: AI design protein has made another breakthrough, and it can design specific functional proteins
- Phpstudy steps to quickly build a website (teach you to build it by hand)
- BA autoboot plug-in of uniapp application boot
- 黑猫带你学eMMC协议第27篇:什么是eMMC的动态容量(Dynamic Capacity)?
- [pictures and texts] detailed tutorial of one click reinstallation of win11 system
- 黑猫带你学eMMC协议第24篇:eMMC的总线测试程序详解(CMD19 & CMD14)
- Merge sort
- STM32 loopback structure receives and processes serial port data
- Application and download of dart 3D radiative transfer model
猜你喜欢

VS code更新后不在原来位置
![[pictures and texts] detailed tutorial of one click reinstallation of win11 system](/img/cc/749fe4095fc5afb1fc2c65df43d06c.png)
[pictures and texts] detailed tutorial of one click reinstallation of win11 system

What if win11 cannot recognize Ethernet

Introduction to border border attribute

Installation and reinstallation of win11 system graphic version tutorial

Leetcode:704 binary search

Uncover why devaxpress WinForms, an interface control, discards the popular maskbox property
![[embedded explanation] key scanning based on finite state machine and stm32](/img/ce/cc3f959a4e4f5b22e2c711ea887ad7.png)
[embedded explanation] key scanning based on finite state machine and stm32

How to add PDF virtual printer in win11

DART 三维辐射传输模型申请及下载
随机推荐
How to use databricks for data analysis on tidb cloud | tidb cloud User Guide
Flexpro software: measurement data analysis in production, research and development
机器学习基础-贝叶斯分析-14
【嵌入式C基础】第4篇:运算符的使用
Using JSON in C language projects
mysql limit 分页优化
LeetCode84 柱状图中最大的矩形
STM32 loopback structure receives and processes serial port data
MySQL is always installed unsuccessfully. Just do it like this
Zurich Federal Institute of technology | reference based image super resolution with deformable attention transformer (eccv2022))
机器学习基础-主成分分析PCA-16
LeetCode94. 二叉树的中序遍历
Jetpack 全家桶之 LiveData 使用及源码篇
Machine learning practice - decision tree-22
.NET的求复杂类型集合的差集、交集、并集
What if the right button of win11 start menu doesn't respond
Brief introduction to JS operator
How to view win11 system and reserved space?
黑猫带你学eMMC协议第24篇:eMMC的总线测试程序详解(CMD19 & CMD14)
Fundamentals of machine learning Bayesian analysis-14