#include<stdio.h>
#include<stdlib.h>

struct temp
{
    int var1;
};

struct temp* doThis()
{
  struct temp* x = (struct temp*)malloc(sizeof(struct temp));
  x->var1 = 10;
  return x;
}

void doThat(void* x)
{
  struct temp * x2 = (struct temp *) x;
  printf("x2->var1 = %d\n", x2->var1);    
  
  struct temp** x3 = x;
  printf("x3->var1 = %d", (*x3)->var1);
}

int main()
{
  struct temp * x = doThis();
  printf("x->var1 = %d\n", x->var1);
  doThat(&x);
}
