memory adress illustration

 avatar
ManhDX
c_cpp
2 years ago
342 B
5
Indexable
Never
#include<stdio.h>
int a;
int main()
{
    /*ko nen lam theo
    vi 4 bytes phia tren vung 
    nho 4 bytes cua bien a co
    the da duoc su dung cho mot
    noi dung quan trong nao do,
    viec ghi de co the gay crash
    chuong trinh
    */ 
    *(&a+1)=1;
    int *p=&a+1;
    printf("*p = %d  -  *(&a+1) = %d",*p,*(&a+1));
}