What is the purpose of the line table_of_sentences ++; ?
Couldn’t it cause undefined behavior if table_of_sentences = &frase2; wasn’t coming right after it ?
The purpose of table_of_sentences ++ is to increment the pointer-to-pointer, exactly as you thought.
Now, about the next question:
Couldn’t it cause undefined behavior if table_of_sentences = &frase2; wasn’t coming right after it ?
You are right here. When working with pointers you have to be careful, because when you increment it, it is going to point to the next address. If the address is used by a variable of another type, and you try to access it, it is going to show you invalid data, or your program is going to crash with “segmentation fault”.
Whenever you see a Segmentation Fault, be sure you have a pointer’s problem.