According to my understanding the output should be |12.3450| but after running the code i get |12.345000| .Please explain why is this so??
Also in the second statement how is false related to %b.when should i get true and when should i get false as the output.Please explain with example?
Md. Minhajur Rahman
Joined: Apr 10, 2012
For float number, If the precision is not specified then the default value is 6. so the output is |12.345000|.
If the precision is specified, that is used. As your 2nd case, precision is 2. so output is 7.00ggfalse. false is printed as you pass false as argument. if you pass true, true will be printed.