Lowest price ever! Learn Generative AI for 48% less!
Get my discount+ 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).
✓
+ 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 )
+ 9
%means the rest of the division
For example:
4%2=0
5%2=1
6%3=0
7%3=1
+ 8
% means Module..
+ 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. 😌
+ 4
C++ provides us many operators like +,-,*,/,%.... etc. % is modulus operators used to find the remainder of the problem
+ 3
It is a modulus
+ 3
it an arithemethic operator modulus
10%3; ans //1 remaider
+ 2
In C++ the operator
%(modulus) is used to calculate the remainder of two numbers.
exemple: 5%3=2.
+ 1
For getting the remainder after division
https://www.sololearn.com/learn/CPlusPlus/1609/
+ 1
Modulus 🙂
+ 1
It's a modules (%)😄
+ 1
i dont know
its wierd i know right
+ 1
It is a modulus operator and is used to return remainder when a number is divided by another.
Eg. 7%2 = 1
+ 1
C++ % means modules. & Modules means remainder divid....,😁😀