if (*(rod+k++) < *min)
*min = *(rod+k++);
The ++ operator is dangerous when you use it like this. You're using it to mean "k+1" but it has side effects. The value of k will get incremented...
Type: Posts; User: sean
if (*(rod+k++) < *min)
*min = *(rod+k++);
The ++ operator is dangerous when you use it like this. You're using it to mean "k+1" but it has side effects. The value of k will get incremented...
Your loops are set up properly to iterate through each possible combination of i and j, but then when you try to read or write a value, you're only using the current value of j, so you're basically...