Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 18
[Definition] : (%) is one of the arithmetic operators and know as modulus operator. [Uses]: ✓ This operator is used to return remainder when one number is divided by another. ✓ it is also used in format specifiers like %d,%c,%s,%f,etc. ✓ it is also used as Assignment operator (%=). [Example] : (In C) : printf("%d",3%2); Output : 1 printf("%d",2%3); Output : 0 (In C++) : cout<< 3%2; Output : 1 [Important points] : ✓operator overloading for this operator is possible. ✓it is a binary operator (which accepts two operands). ✓
18th Jun 2019, 3:35 PM
Manoj
Manoj - avatar
+ 12
For example: int a = 11; int b = 3; int sum; sum = a / b; ( answer would be 3, because 3 * 3 = 9 ) sum = a % b; ( answer would be 2, because 11 - 9 = 2 )
18th Jun 2019, 8:17 AM
cadbrooke
cadbrooke - avatar
+ 9
%means the rest of the division For example: 4%2=0 5%2=1 6%3=0 7%3=1
18th Jun 2019, 5:16 PM
Sam #[Be Optimistic] [Inactive]
Sam #[Be Optimistic] [Inactive] - avatar
+ 8
% means Module..
18th Jun 2019, 8:26 AM
Nora
Nora - avatar
+ 6
It is known as modulus, use to computes the remainder like 10%2=0 11%2=1 12%2=0 Something like this, you take any integer value and get remainder after using modulus operator. 😌
18th Jun 2019, 3:34 PM
Mohd Vais
Mohd Vais - avatar
+ 4
C++ provides us many operators like +,-,*,/,%.... etc. % is modulus operators used to find the remainder of the problem
19th Jun 2019, 3:15 AM
Manohar Lakhineni
+ 3
It is a modulus
18th Jun 2019, 2:46 PM
Mansi
Mansi - avatar
+ 3
it an arithemethic operator modulus 10%3; ans //1 remaider
20th Jun 2019, 4:31 AM
E∆SI🇳🇬🤖
E∆SI🇳🇬🤖 - avatar
+ 2
In C++ the operator %(modulus) is used to calculate the remainder of two numbers. exemple: 5%3=2.
20th Jun 2019, 4:58 AM
Lorenzo Busolini
Lorenzo Busolini - avatar
+ 1
For getting the remainder after division https://www.sololearn.com/learn/CPlusPlus/1609/
18th Jun 2019, 8:07 AM
Gordon
Gordon - avatar
+ 1
Modulus 🙂
18th Jun 2019, 2:34 PM
Sanjay Kamath
Sanjay Kamath - avatar
+ 1
It's a modules (%)😄
18th Jun 2019, 5:51 PM
Mayank Chattree
Mayank Chattree - avatar
+ 1
i dont know its wierd i know right
18th Jun 2019, 10:34 PM
Kaiden
+ 1
It is a modulus operator and is used to return remainder when a number is divided by another. Eg. 7%2 = 1
18th Jun 2019, 11:52 PM
Wallace Sheundah
Wallace Sheundah - avatar
+ 1
C++ % means modules. & Modules means remainder divid....,😁😀
20th Jun 2019, 4:39 AM
Bobby Micro
Bobby Micro - avatar