+ 1

Can somebody please tell output of statement printf("%-6.3f",39689.8965); with explanation?

3rd Oct 2019, 1:29 PM
Shraddha Gupta
4 Réponses
3rd Oct 2019, 1:50 PM
id001x
id001x - avatar
+ 2
Thanks
3rd Oct 2019, 1:58 PM
Shraddha Gupta
+ 2
To see the effect of "-" add something after %-6.3f and as ~ swim ~ said increase the width, for example: printf("%-21.3f hello", 39689.8965); also try with zero: %021.3f
3rd Oct 2019, 2:35 PM
voja
voja - avatar