जॉइन Examsbook
1264 0

प्र: What do the functions atoi(), itoa() and gcvt () do? Show how would you use them in a program.

  • उत्तर देखेंउत्तर छिपाएं
  • Workspace

उत्तर :
व्याख्या :

atoi()         Converts a string to an integer. itoa()         Convert an integer to a string gcvt()        Converts a floating-point number to a string   #include "stdlib.h" main() {       char s[] = "12345";       char buffer [15], string[20];       int i;              i = atoi (s);       printf("\n%d",i);          gcvt (20.141672, 4, buffer);        printf ("\n%s", buffer);          itoa(15, string,2);         printf ("\n%s", string); }

क्या आपको यकीन है

  त्रुटि की रिपोर्ट करें

कृपया संदेश दर्ज करें
त्रुटि रिपोर्ट सफलतापूर्वक जमा हुई