C language interview questions solution for freshers beginners placement tricky good pointers answers explanation operators data types arrays structures functions recursion preprocessors looping file handling strings switch case if else printf advance linux objective mcq faq online written test prime numbers Armstrong Fibonacci series factorial palindrome code programs examples on c++ tutorials and pdf

you may get the result like 23.4345343. In this you may like to have two digits after 23 like 23.43 . So %.2f will bring only two digits after 23 and %.3f will bring 3 digits after 23.

## 4 comments:

A simple and good logic...........

Why did we use %.2f?

you may get the result like 23.4345343. In this you may like to have two digits after 23 like 23.43 . So %.2f will bring only two digits after 23 and %.3f will bring 3 digits after 23.

how it'll work with array...

can u please provide the code

Post a Comment