Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Dynamic arrays + shell sorting method
Basically, what I want to know is, how would shell shorting method work in such program , cause I don't clearly understand the algorithm of this method..
The program: #pragma
argsused#include #include #include #include
int i,j; //cikla mainigie
int *p; //norade uz masivu ar noradem
int n; //masiva elementu daudzuma mainigais
int temp; //temp mainigais, hvz?
int *garumi; //dinamiska masivo kolonnu,rindu skaita daudzuma masivs
int **matrica; //dinamiskais masivs
printf("How much rows??
printf("The amount of rows must be > 0!");
for (i=0;i 0!");
printf ("How much rows in %d. row??
printf("Enter [%d][%d] element: ", i+1,j+1);
and now I should sort it, but I don't know how to do it, if anyone can help me, thanks :)
I would also like to know how can I change the amount of columns in a row? like add/delete function? I'm so confused about all this.