you can follow any one of below
scanf("%d%d",&(*p).real,&(*P).imaginary);
scanf("%d%d",&*p->real, &*P->imaginary);