convert int to string without using standard library (stdio.h)



Hi

I am a novice in C. Could you guys help me solve this problem -

I need to convert integer(and /short) to string without using sprintf
(I dont have standard libray stdio.h).

for instance:-
int i =2;
char ch 'A'

My result should be a string ==> "A2"

Results are not going to a standard output - I have a function to
readout/display string from memory.

Thanks,
cQ

.



Relevant Pages

  • Re: convert int to string without using standard library (stdio.h)
    ... I am a novice in C. Could you guys help me solve this problem - ... I need to convert integerto string without using sprintf ... Double check that you don't have sprintf in your system libraries ...
    (comp.lang.c)
  • Re: How to left pad a string with spaces?
    ... How do I use sprintf to convert the string so it has 4 spaces padded on ... If copying takes place between objects that overlap, ... What would happen if myvar were defined as ...
    (comp.lang.c)
  • Re: How to left pad a string with spaces?
    ... How do I use sprintf to convert the string so it has 4 spaces padded on ... If copying takes place between objects that overlap, ... What would happen if myvar were defined as ...
    (comp.lang.c)
  • Re: Partial string loss with sprintf/strcat
    ... string the device is sending is missing it's header. ... sprintf(tmpMsg, ... sprintf(Message, "%04d%s", len, tmpMsg); ... The entire header appears to be getting lost. ...
    (comp.lang.c)
  • Re: sprintf
    ... On the other hand, I'm free to use sprintf(), so I can convert everything I want to print into a string and then forward that string to PrintOnConsole. ... My problem now is that I don't know how many characters sprintf() will put in the buffer provided as first input argument. ... float GimmeAFloat ...
    (comp.lang.c)