[wplug] C code problem

bpmedley at 4321.tv bpmedley at 4321.tv
Wed Oct 23 16:26:48 EDT 2002


On Wed, 23 Oct 2002, Henry Umansky wrote:

> Can someone explain to me why on my machine the printout value for i is
> different.  I compile this with gcc version 2.95.3 20010315.  Can someone
> else try compiling this and running it and keep an eye on the two values
> that are printed out.
>
> #include <stdio.h>
>
> int main() {
> int i;
>
> for(i=0;i<100000000000;i++)
>         if(i%100000==0)
>         printf("%d : %d\r", i, i);
> }

I tried it and it appears that both i's are the same.  gcc -v yields:
    gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-112)

-- 
~'`^`'~=-.,__,.-=~'`^`'~=-.,__,.-=~'`^`'~=-., \|/  (___)  \|/ _,.-=~'`^`
                          Brian Medley         @~./'O o`\.~@
"Knowledge is Power" brian.medley at verizon.net /__( \___/ )__\  *PPPFFBT!*
  -- Francis Bacon                               `\__`U_/'
 _,.-=~'`^`'~=-.,__,.-=~'`^`'~=-.,__,.-=~'`^`'~= <____|'  ^^`'~=-.,__,.-=
~`'^`'~=-.,__,.-=~'`^`'~=-.,__,.-=~'`^`'~=-.,__,.-==--^'~=-.,__,.-=~'`^`




More information about the wplug mailing list