The C standard says: When integers are divided, the result of the / operator is the algebraic quotient with any fractional part discarded (This is often called ‘‘truncation toward zero’’).
So it should be 0 (as per C standard, not sure what C++ standard says)
slymon99|3 years ago
pksadiq|3 years ago
The C standard says: When integers are divided, the result of the / operator is the algebraic quotient with any fractional part discarded (This is often called ‘‘truncation toward zero’’).
So it should be 0 (as per C standard, not sure what C++ standard says)