well, i won't do your homework for you, but if you post up what you tried, maybe we can help you out with it.
first, though, the code you pasted has a bug:
Code:
for(int index = '0'; string1[index] != 0; ++index)
'0' is NOT the same as
0 (in fact, '0' = 48). you probably want index to start from 0, not '0'.
looks like your professor gave you half of the solution. look at that code and think about what it does. what state will your arrays be in once it does a few iterations? when does it stop? what else do you need to do to complete the problem.