C sintax
John Stanley
john at viper.Lynx.MN.Org
Mon Feb 8 18:29:45 AEST 1988
In article <165600034 at uiucdcsb> wsmith at uiucdcsb.cs.uiuc.edu writes:
>
>main()
>{
> int a,b;
>
> a = 0; b = 0;
>
> printf("%0d",a+++b);
>}
>
>Is this (a++)+b or a+(++b)?
>
>Bill Smith
>pur-ee!uiucdcs!wsmith
>wsmith at a.cs.uiuc.edu
Because the C parser is defined as always taking the largest number
of characters that can be interpreted as a single token, and that it
scans from left to right, the answer should always be:
((a++)+b)
---
John Stanley (john at viper.UUCP)
Software Consultant - DynaSoft Systems
UUCP: ...{amdahl,ihnp4,rutgers}!meccts!viper!john
More information about the Comp.lang.c
mailing list