Questions about allocation Dynamic [closed]

1

How do I get C to get a variable, as in the example below, to make N = vector.

If I'm to play N in another function and put it inside a for , then I want to reallocate the vector value by increasing N times. And thus increasing N propositionally. To be able to insert more data into the loop

And another doubt as I pass this vector variable by referenciana function?

scanf("%i", &N);  
vetor = malloc(N * sizeof(int)); //vetor de struct
    
asked by anonymous 02.09.2017 / 06:32

0 answers