Using realloc inside a function [duplicate]
问题 This question already has answers here : C Programming: malloc() inside another function (8 answers) Closed 5 years ago . My apologies, I know many related questions have already been asked, so I will keep it very simple. Despite some years of programming I cannot find the correct syntax for resizing and modifying an array (or several) inside a function. For example, say I want a function to fill an array with a set of "n" numbers, where "n" is defined within the array: int main(int argc,