Example problem...

This is part of some code. I do not know how to explain this part of code. Please help :(


int k = 0, l=n-1, m=k;
while(k<l){
while(*(a+k)<=*(a+m)) k++;
while(*(a+l)>=*(a+m)) l--;
if(k<l) pom = a[k], a[k++]=a[l], a[l--]*pom;
}
It is a silly code. That is its explanation.:)
Last edited on
It's especially silly in the last part, the result of the subexpression "a[l--]*pom" is unused, it could be just "--l"
what this line of code mean -> while(*(a+k)<=*(a+m))

is it variable "a" pointer to memory location (example. 0x00604b88)?
And how to this memory location add variable k? (k=0)

I do not understand what this all means :(
Topic archived. No new replies allowed.