0
% use in c language?
8 odpowiedzi
+ 7
The percentage symbol(%) is known as modulo operator in arithmetic operations.
It returns the reminder in a division.
10%4 = (2*4+2)%4 = 2
20%6 = (3*6+2)%6 = 2
...
Similarly,
j = i%2 = 4%2 = (2*2+0)%2 = 0
+ 6
For example?
+ 4
It can be used to develop software like operating systems, databases, compilers
+ 2
Int i = 4;
Int j;
j = i%2
In this case % what mean?
+ 2
Now i understand thanks bro .
+ 2
The % symbol is the modulus operator for denoting the remainder in division.
9%5 = 4, since 9 divided by 5 returns 1 with a remainder of 4.
+ 1
10%4 Returns the remainder of 10 divided by 4.