# C Programming :: Floating Point Problems

**Home**>

**C Programming**>

**Floating Point Problems**>

**Discussion**

## 4. If a = -11 and b = -3 what is the value of a%b?

**Answer:**

**Option D**

**Explanation :**

**Note: %** is a **reminder operator** in c programming (and programming language). For the remainder operator, the sign of the result is the same as the sign of the dividend.

C define % operator operation for a%b as below:

**a = (a/b) * b + a%b**

Here dividend is negative so the answer will be **-2**

**Important Points:**

=> The answer will be -2 in the scenario where a = -11 and b = 3

=> The answer will be 2 in the scenario when a = 11 and b = -3 or 3

**Note: %** is a **reminder operator** in c programming (and programming language). For the remainder operator, the sign of the result is the same as the sign of the dividend.

C define % operator operation for a%b as below:

**a = (a/b) * b + a%b**

Here dividend is negative so the answer will be **-2**

**Important Points:**

=> The answer will be -2 in the scenario where a = -11 and b = 3

=> The answer will be 2 in the scenario when a = 11 and b = -3 or 3

Report Error

Please Login First Click Here