At these two lines:
*min=t[0];
*max=t[0];
Your code assumes that t[0]
is an even number. However, that’s not necessarily true.
One fix would be:
*min = INT_MIN;
*max = INT_MAX;
1
solved Why is this program going this way? C
At these two lines:
*min=t[0];
*max=t[0];
Your code assumes that t[0]
is an even number. However, that’s not necessarily true.
One fix would be:
*min = INT_MIN;
*max = INT_MAX;
1
solved Why is this program going this way? C