typedef struct{ char name[10]; double diameter,orbit_time, rotation_time; int moons; }planet_t; status = scan_planet(¤t_planet); int scan_planet(planet_t *plnp){ int result; result= scanf("%s",(*plnp).name); if(result==1) result=1; else result =0; return(result); }
reference Type value;
plnp planet_t * address of structure that main refers to as current_planet
*plnp planet_t structure that main refers to as current_planet
i don understand the reference part and the type part? What does it mean?
For a pointer, the * sign belongs to the data type(for example int,char) or the variable type (the identifier)?
and is this function filled up with input or output argument? Whatever the case, what is the difference between them?
and the * in *plnp in the body of the function is the deference point right?
Sorry for the noob questions, i am self learning and kinda of getting confused here with pointer, and pointer as argument.
thanks