If p and q are integers, then for p % q: If p is 0, then division by zero generates a compile-time error. If p is some number (integer) and q is 0, then also we get a compile-time error. Also, one cannot use and apply the % operator on an available set of floating numbers (that is float or double). If we try to use this operator with any floating-point variables or even constants, the compiler will generate a compile-time error.