I think Sir you took my question in a wrong way.
No. You formulated your question in a totally vague way. The right question would have been
"I want to display a float variable using printf(). How can I change the format of the output?"
In this case, I would have suggested to google for c printf format specifiers float because thousands of coders have asked this question before you.
I remember looking for the printf() format specifiers when I first downloaded Pelles C a few years ago. I wanted to find out how to represent long long int and long double in printf() and scanf() statements. I went 'nuts' trying to find information in the help section. The printf() only mentioned that the common format specifers are allowed. It did not list them, (%d, %ld, %f, %lf, %p, etc.) I could find out how much storage each type of variable took and the minimum and maximum limits allowed. There was no mention of how to set widths and precision, (%5d, %7ld, %5f, %-5.0f, %-25s, etc). At least any references that I could find!
I made the inference that one had to be an experienced C programmer, or at least knew basic C programming, before using Pelles C. I was fortunate, that as a hobby programmer, I had some experience with Turbo C 3.1.
(Oh, I learned the specifiers for long long int, (%lld), and long double, (%Lf), while taking an online course for C++. I must be dense, I really do not see much advantage of using C++ over C; but, then again, I mostly write simple console programs.)
-David E.