Default print format of printf is as follows:
where x = number of digits to be printed for float including dot
y = number of digits in decimal fraction, i.e. to the right of dot
If we want to show up to 2 decimal places for fraction and say 2 characters before the fraction.
The format will be:
About our authors: Team EQA
You have viewed 1 page out of 248. Your C learning is 0.00% complete. Login to check your learning progress.
Questions index C Questions C++ Questions Win32 MFC COM/DCOM DLL Questions
Compilers & Editors
Download Visual Studio Download XCode Download Visual Studio Code Android studio install sdk Eclipse installer Best C compilers IDEs
Development system setup
Windows media creation tool MSDN subscription Ubuntu virtualbox
New updated posts
Why learn C? Calculate weighted average