I try to divide int by unsigned int and I get unexpected result:
int b;
unsigned int c;
int res;
float res_f;
b = -25;
c = 5;
res = b / c; // res = 858993454
res_f = b / c; // res_f = -5.000000
The same works just fine for '+', '-' and '*', but fails for '/'. What is it that I miss here?
P.S.
It was tested on different compilers and the result was the same.