Ok firstly I\'ll explain my assignment. For this assignment I have to use dynamic memory allocation which I am having no problems with. What I am having a problem with is fi
To see the task it is better at least for the first time to write some block-scheme of what you have to do in a program. In your case:
So the first step is to read information from user. You can use scanf(): In the simplest way you can do that step-by-step for each field:
#include
...
int value;
scanf("%d", &value);
...
In case of success this function should return number of items it reads (1 in your case). For phone you should use scanf("%ld", &phone).
To resize array use function realloc() (#include :
realloc(&ptr_to_array, new_size);
Each elements of the array is a pointer to structure "student". Next steps are similar.