+ 3

What is meaning of "%4d" ,"%7.2f". In printf function.

why it's required.

6th Mar 2018, 6:53 AM
SAHIL GEVARIYA
SAHIL GEVARIYA - avatar
2 Antworten
+ 5
%4d means 4 spaces and then after print and same %7.2f, but .2 indicate after point only show two values. e.g. https://code.sololearn.com/cb04LL34Q0HG/?ref=app e.g #include <stdio.h> int main() { int a,b,c; printf("%4d\n",10); printf("%11.2f",11.2345); return 0; }
6th Mar 2018, 4:28 PM
Gajendra Parmar
Gajendra Parmar - avatar
0
no
4th May 2023, 6:46 PM
VIGNESH E IT-2022
VIGNESH E IT-2022 - avatar