You are looking for a null char, but there is no null char in the array. (You fill all 100 elements with random)