#include<stdio.h>
#include<stdlib.h>
int main(){
  int* a = NULL;
  int* b = a;
  b = (int*)malloc(sizeof(int));
  *b = 10;
  printf("%d, %d", *a, *b);
  return 0;
}
With the code above, I found that although I change the value that b dereferences, the value that a dereferences does not change. Can someone explains why? I thought they should change together.
 
     
    