- 1
What "%" means in programming?
9 Answers
+ 5
That depends on the context and the programming language. Please give an example.
Some programming language use "%" as modulo operator or for string formatting.
+ 3
Akintunde Rotolu ,
5 % 3 = 2 not 0
+ 2
The % sign refers to modulus which means it gives the remainder of the given division. For example:-
10%2 =0 because 2 can completely divide 10
And 7%2 = 1
So basically it just returns the remainder
+ 1
Its the modulus operator and can be used to find the remainder of the division of two numbers for example,
10 / 3 = 3 // 3 goes in to 10 3 times therfore 3 is returned
10 % 3 = 1 // 3 goes in to 10 3 times and the remainder is returned in this case 1
0
It generally means modulo or remainder
7 % 3 = 2 multiples of 3(3,6) and a remainder of 1
But the remainder is the only thin g considered therefore,
7 % 3 = 1
0
It depend on the language, if it is SQL,% is part of the wildcard. It is use as: SELECT *
WHERE title LIKE %A
This means select a title in the database that start with A.
0
Modulo operator it returns remainder from mathematical expressions
0
Means reminder
- 1
It means modules more like remainder
Example
3 % 3 = 0
5 % 3 = 0
So all it does is divide the by 3 and returns the remainder