Arithmetic Operators in C++ — a practical guide to C++ arithmetic operators with clear examples you can reuse in real projects.
C++ Tutorial Series (18/111). Prefer one article? Read the complete C++ tutorial.
Short description
Integer division truncates toward zero (since C++11 for integers).
Arithmetic
int a = 10, b = 3;
int q = a / b; // 3
int r = a % b; // 1