You don't need the extra indirection.
Code:void modify( struct node *dsptr) { dsptr->x = 42; dsptr->y = 'Q'; } int main(void) { struct node *sptr = malloc (sizeof(struct node)); printf(" sptr store at location : %p \n", &sptr); printf(" value of sptr = %p \n", sptr); sptr -> x = 1; sptr -> y = 'A'; printf(" value of first object of structure = %d \n", sptr -> x); printf(" value of second object of structure = %c \n", sptr -> y); modify(sptr); return 0; }