I am attempting to sort array of string with insertion sort alghoritam
but i got run time error, problem is in variable i, in while loop
when insted it in while condition put some number it work ....help....
actually
while(niz[i]>temp && i>=0)
{
niz[i+1]=niz[i];
i--;
} ;
this loop is checking for the last value of niz array as well so if it find that if the first element is >temp. i.e niz[0]>temp then it will enter the loop and execute i--
which is being happening in your code as "af" <"am"
so what you can do is make it i>0 i.e
while(niz[i]>temp && i>=0) and explicitly check for niz[0] and niz[1] position or
you can take niz[0] to be smallest for niz all(for the sake of running the program)
hope this will help as this is my first posted solution :)