wrote:
>
> as many as possible.
> int i = 333;
> char* s;
> how to convert i to s;
You could write some code, or you could use the standard library
that comes with most C systems (all hosted C systems). It's up to
you. If you write the code you get to define 'convert'. One
possibility follows:
void convert(int i) {
if (i < 0) putchar('-');
else i = -i;
while (i++ < 0) putchar('1');
putchar('\n');
}
Note that I took advantage of the ability to define. Some would
consider this a base 1 representation of i. By using a file I
avoided the necessity of providing a possibly very large string
buffer.
--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Also see <http://www.safalra.com/special/googlegroupsreply/>