🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #41605

strange output

#41605
From: Jun
Date: Tue, 27 Feb 1996 00:00
16 lines
738 bytes
The output of the following program compiled with gcc-2.6.3 in solaris
is 8.  Why is that?

Thanks.
----------------------------------------------------------------------
#include <stdio.h>

main() {
    int i = 2;
    i = i++ * ++i;
    printf("%d\n",i);
}
-- 
Jun  
Email:              jshih@plg.uwaterloo.ca
WWW:                http://barrow.uwaterloo.ca/~jshih
Technical Details
Message-ID: <uzn364flu0.fsf@neumann.uwaterloo.ca>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,c91e7980b5876ec4,start
X-Google-Attributes: gid11318c,public
From: jshih@uwaterloo.ca (Jun)
Subject: strange output
Date: 1996/02/27
Message-ID: <uzn364flu0.fsf@neumann.uwaterloo.ca>
X-Deja-AN: 141405248
sender: jshih@neumann.uwaterloo.ca
organization: uw
newsgroups: gnu.gcc.help