Why this code does not give formatted output as %5d should shift digits. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why this code does not give formatted output as %5d should shift digits.

https://code.sololearn.com/cLL1OuF6uBH2/?ref=app required o/p: 5 4 3 2 1

2nd Oct 2018, 3:08 AM
shreyash joshi
shreyash joshi - avatar
1 Answer
+ 1
c compiler detect %d as an specifier and only numbers are allow in between % and d but c compiler allow one thing if user want to put variable with %d then can use wild card and that is *
3rd Oct 2018, 5:12 AM
Sumit