Help !!(Urgent) As we know, we can convert an character or string to an integer by using the command 'atoi()' or 'atol()'. On the other hand, if we want to convert an integer to character or string then wat should we write ? What command or function we can use ??
THanks for helping
In programming C, how to convert an integer type variable to character type ?
#include %26lt;stdio.h%26gt;
char foo[16];
int number=5;
sprintf(foo, "%d", number);
Reply:use sprintf. search the web or your compiler documentation for details.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment