Download Android App in your Android Device from Google Play Store
- Search for "Withoutbook Practice Exam Test" in Mobile/Tablet Play Store
Practice InterviewNew Search by Name or Email

Exams Attended

Make Homepage

Bookmark this page

Subscribe Email Address

Language in C Interview Questions and Answers

Ques. How do I print a floating-point number with higher precision say 23.34568734 with only precision up to two decimal places?

Ans. This can be achieved through the use of suppression char '*' in the format string of printf( ) as shown in the following program.
main( )
int i = 2 ;
float f = 23.34568734 ;
printf ( "%.*f", i, f ) ;
The output of the above program would be 23.35.

Is it helpful? Yes No

Most helpful rated by users:

©2020 WithoutBook