 <p>dynamically allocate memory for a <code>int</code>.<br> everytime you get a element satisfying the condition and add the element to a dynamically allocated array of integer.<br> use <code>realloc()</code> to increase the size of the <code>int</code> array pointed by some pointer and add the new element to that array.<br> use counter to know the number of elements in array.</p>