The problem is you should iterate with a counter i (if I correctly understood what you want to do).
If I understood what you want to do, you should write some char entries, and when you want to finish you write exit to stop the execution, right?
Like that, it stops only when the first character of the array is e, the second is x etc. It doesn't make a lot of sense. For example the entry x e x i t will not terminate your program, because arrayDna[0] is x, and you will never get out of while loop.

It should be better to use parameters like arrayDna[i]!='e'&& arrayDna[i+i]!='x' etc, so you can check this condition each time you increment your i.

Another thing.

Usually the algorithm for filling arrays with chars, consists in scanning the line, and when you hit Enter you finish the line.

In the while loop, you check if next char is EOL (end of line, it means you have no more chars to insert in the array). If it's not EOL, you insert the next char in the array, and so on.