Hi, I wanna add a row that follows the first row where all the elements are prime numbers. Please help, why doesn't my code work. I guess the loop where i try to lower the following rows to add my new row doesn't work properly.
I think his point is that you're overwriting the address held by the last pointer p[n-1]. You must save that value before shifting all down so you can copy it to p[i+1] after the shift.