Home >Backend Development >C#.Net Tutorial >What does % mean in C language
#What does % mean in C language?
1. Modulo operation, that is, finding the remainder.
The expression a%b is the remainder obtained by dividing a by b.
For example: the result of 4%3 is 1
2. The escape character
, for example, often appears in input parameters in scanf() and printf() Variables with % represent parameter types, such as %d, %f, etc.
1.100%10 这时候%是取模,即取余数 2.printf("%d",10);这时候%是格式输出控制,后面的d表示这里要代入一个整数,也就是后面那个10
Recommended tutorial: "c Language"
The above is the detailed content of What does % mean in C language. For more information, please follow other related articles on the PHP Chinese website!