Akash Goswami wrote: > thanks thomas.........for advising & giving the links... bt what's the > problem with the coading!!! > my compilers ran easily!! > > > > ________________________________ > From: Thomas Hruska <[email protected]> > To: [email protected] > Sent: Saturday, 5 September, 2009 10:28:32 AM > Subject: Re: [c-prog] what would be the output > > > Brett McCoy wrote: >> On Thu, Sep 3, 2009 at 7:53 AM, Akash Goswami<akashgoswami93@ yahoo.com> >> wrote: >> >>> #include<stdio. h> >>> #include<conio. h> >>> int main() >>> { >>> int m=1; >>> m=m++ + m++ + ++m + ++m; >>> printf("%d", m); >>> getch(); >>> }
Aside from the undefined behavior (multiple code points in a single C statement), no return value from main(), poor use of whitespace, the use of a non-Standard header and non-Standard function (conio.h most likely means Turbo C, a VERY ancient compiler), which in turn, means you are likely using an outdated compiler and desperately need to upgrade. Just because something compiles or even runs doesn't mean it is written correctly. -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 *NEW* MyTaskFocus 1.1 Get on task. Stay on task. http://www.CubicleSoft.com/MyTaskFocus/
