Software Engineering Rounding Functions in C / C++ In this article, we have focused on different rounding functions in C and C++ such as floor, ceil, round, trunc and fmod. We have explained each in detail with C++ code examples.