rand()




I have this peace of the code:

char tmp1[19], tmp2[19], tmp3[19];
itoa(rand(), tmp1, sizeof(tmp1));
itoa(rand(), tmp2, sizeof(tmp2));
itoa(rand(), tmp3, sizeof(tmp3));

The output is:

tmp1 = 23;
tmp2 = 2d2i;
tmp3 = ha7;

The output is allways the same. :( Also, I don't understand how conversion
from int into char[] can be "2d2i" or "ha7" ?!?


.



Relevant Pages

  • Merging 2 tables
    ... I realize this is somewhat backwards from "good practice", ... make conversion into another system easier. ... Prev by Date: ...
    (microsoft.public.access.queries)
  • Re: What Year Did Jazz Die
    ... our radio station was playing "Better Git It In Your Soul" and it lifted me ... Peace, ... Paul ... Prev by Date: ...
    (rec.audio.pro)
  • Eliminate unused columns
    ... is there a smarter way to do the conversion than sum across an fill ... Prev by Date: ...
    (microsoft.public.excel.misc)
  • Re: Pseudocode in the wikipedia
    ... syntactical features of the language. ... Peace ... Bill Mill ... Prev by Date: ...
    (comp.lang.python)
  • Re: Something entirely different....
    ... puzzles with a ballpoint pen... ... Prev by Date: ...
    (alt.gathering.rainbow)

Loading