hi friends
I know the basic rule that to access a structure member using pointer we need to use "->" operator .But as i have programmed using this i got a very unexpected output i.e the output is getting into indefinite loop
the main line which i feel might be wrong is
scanf("%s %d",&ptr->name,&ptr->prid);
where
ptr=pointer to structure variable
name & prid are product name and product id
printf("%s %d",(*ptr).name,(*ptr.prid));
though in printf i accessed it in both ways i.e one as shown above and another by using "->" operator but both dint yeild any result
thanks in advance