Perhaps the pseudo-code below will help you on your way.
Instead of defining arrays at compile time, define them dynamically at run-time. Since, at compile time, you won't know the size of the arrays, just define them to 'point' to arrays, and worry about assigning memory to the arrays after their size is known (at run-time):
char *names;
unsigned int *ages = NULL;
unsigned int *weights = NULL;
I assume (since you didn't share this information in your question) that your code has storage similar to the following, used with fgets() to request "the number of people" as a string:
char tmpStr[MAX_NAME_SIZE];
int numberOfPeople;
printf("Enter the number of people: *");
fgets(tempStr, sizeof(tmpStr), stdin);
numberOfPeople = atoi(tmpStr);
Now that you know the numberOfPeople, allocate an array of name pointers, an array of ages integers, and an array of weights integers.
names = malloc(numberOfPeople * sizeof(*names));
ages = malloc(numberOfPeople * sizeof(*ages));
weights=malloc(numberOfPeople * sizeof(*weights));
To initialize the arrays, I (again) assume your code does something like a for loop, where you ask the user for the various array elements:
for(i=0; i<numberOfPeople; ++i)
{
printf("Enter name #%d: ", i);
fgets(tmpStr, sizeof(tmpStr), stdin);
Now, allocate memory, and store the entered name in the names array.
names[i] = strdup(tmpStr);
The 'strdup()' function calles 'malloc()' internally, allocating just enough memory to store the specified string (tmpStr); then it copies the string (tmpStr) to the allocated memory, and returns the address of the allocated memory; which is assigned to 'names[i]'.
Then get the age from the user:
printf("Enter age #%d: ", i);
fgets(tmp, sizeof(tmpStr), stdin);
ages[i] = atoi(tmpStr);
Then get ...
...