Re: printf execution problem
- From: rahul8143@xxxxxxxxx
- Date: 30 Sep 2005 07:33:04 -0700
David Resnick wrote:
> rahul8...@xxxxxxxxx wrote:
> > Does printf output depends on compilers or operating systems? I have
> > one program
> > int main()
> > {
> > int i=5;
> > printf("%d %d %d",i++,i++,i++);
> > return 0;
> > }
> > Output of this program on DOS (TC) 7 6 5
> > Output of this program on Windows (VC++) 5 5 5
> > Output of this program on Linux (GCC) 7 6 5
> > so these outputs conlude that behaviour of this program is undefined.
> > is that right?
> > but can anybody have any other answer to this behaviour in terms of OS
> > or Compiler???
> > Thanks for help.
>
> Learn to read the group and FAQ before posting, this is asked all the
> time.
> http://www.eskimo.com/~scs/C-faq/q3.2.html
>
I have first read above link and then decided to ask question. The
link said that such programs behaviour is undefined and depends on
compiler. But i thought that is there any hidden relationship of this
behaviour to OS. Nowadays no one uses DOS but everybody says to use GCC
but most people also uses VC++. so doesn't it create a war of
compilers(which to use?)
> I wish google groups supported killfiles.
>
> -David
.
- Follow-Ups:
- Re: printf execution problem
- From: Jaspreet
- Re: printf execution problem
- From: Flash Gordon
- Re: printf execution problem
- Prev by Date: Re: offsetof
- Next by Date: Re: Detecting Reads of Global Uninitialized Variables
- Previous by thread: Re: Looking for PowerC Library Source Disk
- Next by thread: Re: printf execution problem
- Index(es):
Relevant Pages
|