+ 4

What is %d use for?

18th Mar 2019, 5:45 PM
Asra
10 ответов
+ 8
// 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
18th Mar 2019, 5:57 PM
program
program - avatar
+ 12
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/
19th Mar 2019, 5:02 PM
Danijel Ivanović
Danijel Ivanović - avatar
18th Mar 2019, 5:48 PM
program
program - avatar
+ 9
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);
19th Mar 2019, 5:12 PM
Danijel Ivanović
Danijel Ivanović - avatar
+ 6
In a printf statement, for example, it is used to print out a value in an integer format.
19th Mar 2019, 12:12 PM
Sonic
Sonic - avatar
+ 5
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
20th Mar 2019, 5:35 AM
Dan Rhamba
Dan Rhamba - avatar
+ 2
Uh Iam not so good in eng.I didn't get them.plz explain more
18th Mar 2019, 5:55 PM
Asra
+ 2
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 ;)
19th Mar 2019, 5:34 AM
Delroy Miller
+ 2
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 😄.
19th Mar 2019, 4:39 PM
Edrees
Edrees - avatar
0
%d is used for integer value
19th Mar 2019, 4:56 PM
Sachin satish kadam