Question:
How is function itoa() written?
Answer:
Source: CoolInterview.com
#include<stdlib.h> #include<stdio.h> int main() { int n = 1234; char p[20]; itoa(n,s,10); printf("n=%d,s=%s",n,s); return 0; }
Source: CoolInterview.com
Answered by: Retheesh G | Date:
| Contact Retheesh G
itoa(n,s,10);
Notice that the itoa() function takes three arguments: the first argument is the number you want to convert to the string, the second is the destination string to put the converted number into, and the third is the base, or radix, to be used when converting the number. Source: CoolInterview.com
Answered by: madhu | Date: 5/1/2008
| Contact madhu
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|