Hello,
Could you please help me with this simple program? It ends after entering the last name to the table, and I don't know why.
I know the answer is short and simple, please point me the bug and tell me how it should be...
I want the program to simply remember five names and then print them.
Your for loop conditions are wrong. Arrays with size N have range 0 to N-1, not range 1 to N.
Because of this, you are skipping the first element and also writing out of bounds which is causing undefined behavior. You are corrupting the state of your program and causing a segfault most likely.