Default print format of printf is as follows:
"%x.yf",
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:
printf("%5.2f");

About our authors: Team EQA

You have viewed 1 page out of 252. Your C learning is 0.00% complete. Login to check your learning progress.

#