Modulus

in c the modulus character is % and can be used as such

int test_data 42;
int result;

result = testdata % 30;

printf("%d", result);

12

returning the remainder of quotient

4 % 2 = 0
42 % 2 = 0
41 % 2 = 1

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License