If we mistakenly assume that two pointers are the same, we may analyze the order of memory changes and, as a result, the actual path of program execution incorrectly. Exercise: Examine the following code.
C
void change(int *p) { *p = 50
; }
void read_value(int *q)
{ int x = *q;
int main() int a = 10;
int b = 20;
Post #1890
43
ReverseEngineering Memory Aliasing بین توابع تا اینجا دیدیم که چطور ممکنه دو تا Pointer به یه آدرس از حافظه اشاره کنن حالا میخوایم یه حالت مهمتر رو بررسی کنیم فرض کنید یه تابع داریم که یه مقدار رو توی حافظه تغییر میده و یه تابع دیگه همون مقدار رو از حافظه میخونه نکته اینجاست…