> Why does the teacher want the students to use a terminator then?
Maybe they're trying to teach how strlen() works.
Maybe they're trying to convey one of several methods of solving the same problem.
> I add the target to the end of a list.
As your your approach, what if your int list[] were const?
For that matter, how do you know there is even room to append something to the array (even temporarily).
Even if there is room, how do you know you're not trashing some user data.
Code:
int list[] = {1, 2, 3, 4, 5, 6, 7, 8, 9 };
if( contains(list,10,5) ) // trashes my data
if( contains(list,10,9) ) // out of bound access
Principle of least astonishment - Wikipedia
And 'register' stopped being useful in the 1990's, when every half-decent compiler started implementing decent optimisation options.