Hi guys, I've been trying to figure this out for hours now, but can't seem to make it work.

I have defined a global struct outside main, and also set it to NULL. In main I assign an int to the struct and prints it fine, but then when I call another function and create a copy of the global struct, I can't seem to access the same struct. The example below is just what I'm trying to figure out first to then apply it to my own code.

any input is highly appreciated.
Happy 4th of July!!!

tdep

Code:
struct hello{
  int test;
}

struct hello newHello = NULL;

main(){
   struct hello * newHello = malloc....
   newHello->test = 1980
   printf("%d", newHello->test); //PRINTS 1980
   outside();
}

outside(){
     struct hello *SecondHello = malloc....
     SecondHello = newHello;
    printf("%d", SecondHello->test); //WONT print 1980
}