The very basics of C family languages, operator % gives the remainder of its left hand side argument when divided by the right hand side one. So, n % 10
is n
‘s last digit in decimal notation (for instance, 3 for 5123.)
More Related Contents:
- Why when i add number to string it shows random text in c++?
- How do I prevent program from running BOTH an IF and ELSE statement with C++?
- What are the rules for calling the base class constructor?
- C++ lambda with captures as a function pointer
- How to print Unicode character in C++?
- C++ Member Initialization List
- How to hide a string in binary code?
- How to initialize const member variable in a class?
- Generating combinations in c++
- Move assignment operator and `if (this != &rhs)`
- Best compiler warning level for C/C++ compilers? [closed]
- Is there any guarantee of alignment of address return by C++’s new operation?
- C++ Header order [closed]
- How can I get rid of the __imp__ prefix in the linker in VC++?
- Good debugger tutorial for beginners [closed]
- error: use of deleted function
- When to use shared_ptr and when to use raw pointers?
- What std::locale names are available on common windows compilers?
- What happens if you increment an iterator that is equal to the end iterator of an STL container
- Why doesn’t this reinterpret_cast compile?
- Get member of __m128 by index?
- How to safely destruct a QThread?
- Overloading operator
- Reading json file with boost
- Why there are three unexpected worker threads when a Win32 console application starts up? [duplicate]
- Range based for loop in function which passes an array as value [duplicate]
- Assign a string literal to a char* [duplicate]
- typecasting Eigen::VectorXd to std::vector
- reading an application’s manifest file?
- How to get the username in C/C++ in Linux?