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 convert a floating-point number to a string?

Ans. Use function gcvt( ) to convert a floating-point number to a string. Following program demonstrates the use of this function.
#include <stdlib.h>

main( )
char str[25] ;
float no ;
int dg = 5 ; /* significant digits */

no = 14.3216 ;
gcvt ( no, dg, str ) ;
printf ( "String: %s\n", str ) ;
Is it helpful? Yes No

Most helpful rated by users:

©2020 WithoutBook