You do not have permission to edit this page, for the following reason:

The action you have requested is limited to users in one of the groups: Users, Administrators.


You can view and copy the source of this page.

Return to Junk.

<syntaxhighlight lang="c" name="junk_1">

  1. include<stdio.h>

int main() { int a; a=5; printf("%d %d %d\n",a,a++, a++); }

</syntaxhighlight>

asuresh@parambara:~$ icc m1.c
asuresh@parambara:~$ ./a.out

7 5 6

asuresh@parambara:~$ gcc -Wall m1.c

m1.c:2:1: warning: return type defaults to ‘int’ [-Wreturn-type] main() ^ m1.c: In function ‘main’: m1.c:6:29: warning: operation on ‘a’ may be undefined [-Wsequence-point] printf("%d %d %d\n",a,a++, a++); ^ m1.c:6:29: warning: operation on ‘a’ may be undefined [-Wsequence-point] m1.c:7:1: warning: control reaches end of non-void function [-Wreturn-type] } ^

asuresh@parambara:~$ ./a.out

7 6 5

(FYI- icc is Intel compiler made by Intel and gcc is GNU compiler)