C/C ++指针传递下,原本值的变换情况分析

The first :Direct value passing

Instance program: to swap value between two numbers
C/C ++指针传递下,原本值的变换情况分析_第1张图片
The values change during progran execution as follow:
C/C ++指针传递下,原本值的变换情况分析_第2张图片

The second :Address Delivery and values will change

C/C ++指针传递下,原本值的变换情况分析_第3张图片
The values change during progran execution as follow:
C/C ++指针传递下,原本值的变换情况分析_第4张图片

The third :Address Delivery but values will not change

C/C ++指针传递下,原本值的变换情况分析_第5张图片
The values change during progran execution as follow:

C/C ++指针传递下,原本值的变换情况分析_第6张图片
so Address delivery does not necessarily change the original value

你可能感兴趣的:(C语言,c++,iot)