What is %d use for?
// If you are not good in English, use HiTranslate to translate each paragraphs in the apps. // https://play.google.com/store/apps/details?id=com.talpa.translate
Please, Before asking a question on the Q/A, try to 🔍SEARCH. . . to avoid from posting duplicate threads! ⇨ Follow community RULES: https://www.sololearn.com/Content-Creation-Guidelines/ https://code.sololearn.com/W26q4WtwSP8W/?ref=app https://code.sololearn.com/WvG0MJq2dQ6y/
C uses formatted output. The 'printf' function has a special formatting character (%) — a character following this defines a certain format for a variable: %c — characters %d — integers %f — floats e.g. printf("%c %d %f", ch, i, x);
In a printf statement, for example, it is used to print out a value in an integer format.
In mathematics its a percentage symbol, in python and most programming languages it's used as a modulo operator symbol or a string formatter character and so much more
Uh Iam not so good in eng.I didn't get them.plz explain more
The Modulus Operator (%) is informally known as the remainder operator because it returns the remainder when one integer is divided by another. o Simply put the Modulus (Modular arithmetic) Operator will display the remainder of the division equation. ▪ 13%6=1 ▪ 7%4=3 ▪ 243%50=43 Let me know if this help ;)
If you mean that (%d) in C As the first comment : it referes to the Format decimal . Only % between two numbers referes to the reminder of the division process as the fourth comment 😄.
%d is used for integer value