Remove duplicates from array and save it to another one
Early termination
After
        dup = 1;

you should break. There's no need to execute the rest of the loop.
Booleans
Consider using &lt;stdbool.h&gt;, making bool dup = false, later assigning it true, and writing if (!dup).
Complexity
In practical terms, an array of five values poses no computational cost. However, if your prof cares about complexity analysis, the &quot;proper&quot; solution to this would need to complete in linear time (rather than your current quadratic time), using something like a hash-set, with pseudocode:
Set *seen = make_set();
for (int i = 0; i &lt; MAX_ARRAY_SIZE; i++)
{
    int m;
    scanf(&amp;m);
    if (!contains(seen, m))
        add(seen, m);
}

for (m in seen)
    printf(m);