Strings are immutable.
Your array contains pointers to the strings. In your for-loop,
fruit is just another pointer to the corresponding
string (it is a copy of the original pointer, this is called 'passing by value'). So, although you change that fruit-pointer, the original pointer in your array (pointing to "bananas") remains unchanged. Can you now explain why text does get changed?