the ++ operator

gepanago gepanago at inf.uth.gr
Thu Nov 20 01:29:14 EET 2003


Tom,
To olo thema ekshgeitai apo to pws o compiler kataskeyazei to syntaktiko 
dentro.Ayto ayksanei pros
ta deksia prin ginei h aykshsh kata 1. Etsi otan ftasei sto prwto fyllo 
tha kanei thn praksh b[i], meta
thn praksh a[i]+b[i], meta b[i++] + a[i]+b[i], opoy to i einai akoma 0 
kai telos prosthetei me to a[i] opoy
kai ayto to i einai 0 giati mphke sto dentro prin mpei to b[i++]...

gepanago

Tom Diamond wrote:

> ?? ??????, ????? ?? ????????:
> --- begin ---
> int main()
> {
> float a[3], b[3];
> float c;
> int i;
>
> /*random numbers*/
> a[0]=0.1; a[1]=2.54; a[2]=7.12;
> b[0]=4.1; b[1]=5.21; b[2]=4.12;
>
> c = 0.0; i = 0;
> c += a[i]+b[i]+a[i+1]+b[i+1];
> printf("%f\n", c);
>
> c = 0.0; i = 0;
> c += a[i]+b[i++] + a[i]+b[i];
> printf("%f\n", c);
>
> c = 0.0; i = 0;
> c += a[i]+b[i++];
> c += a[i]+b[i];
> printf("%f\n", c);
> }
> --- end ---
>
> ?? ???? ???????????? ??? ?????? ?? ?? ?????? ?? ???????? ????; ?? 
> ?????? ??? ??????? ???????????. ?? ?????? ?? ??? '++'; ????????? ??? 
> ???? ??? ???? ??????? ???? ??? ??????? ???? ??;
>
> Tom.
>





More information about the Linux-greek-users mailing list