C (itan Re: Ligo asxeto ...)
D.A.Glynos
glynos at dial.pipex.com
Sun Sep 26 16:08:11 EEST 1999
On Sat, 25 Sep 1999, Vasilis Vasaitis wrote:
> On Sat, Sep 25, 1999 at 02:28:07AM +0300, Giorgos Keramidas wrote:
> >
> > Pzzzzzttt ! xasate... next please...
> >
> > Ama exeis dnlwsei: int *p;
> > Tote to p++ einai isodunamo me: p += sizeof(int);
>
> Ðæææææôôô! ×Üóáôå! Ï åðüìåíïò...
>
> ¶ìá Ý÷åéò äçëþóåé `int *p;', ôüôå ôï p++ åßíáé éóïäýíáìï ìå ôï `p += 1',
> êáé ôåëéêÜ ôï p èá áðïêôÞóåé ôçí ôéìÞ ðïõ åß÷å áñ÷éêÜ ç ðáñÜóôáóç `p + 1'.
> ÖõóéêÜ îÝñù üôé áðëÜ îÝ÷áóåò üôé Ý÷ïõìå íá êÜíïõìå ìå áñéèìçôéêÞ äåéêôþí êáé
> åß÷åò óôï ìõáëü óïõ êÜôé óáí `p = (int *) ((int) p + sizeof(int))' (áí êáé
> äåí ôï óõíåéäçôïðïßçóåò), üìùò ôïõò Üëëïõò ìðïñåß íá ôïõò ìðåñäÝøåéò.
Vassilh , den katalava kala to argument sou.
Uponoeis oti to parakatw den tha mas kanei print to noumero 2000 ?
int main(){
int a, b[3], *c;
printf("The size of our integers is %i\n",sizeof(a));
b[0]=1000;
b[1]=2000;
b[2]=3000;
c=b;
printf("The second element of the array is %i\n",*(++c));
return;
};
>
> --
> Vasilis Vasaitis
> vvas at hal.csd.auth.gr
>
> Nuke them till they glow, then shoot them in the dark.
dimitris
--
====================================================================
Gia boithia (h na diagrafhte) e-mail sto majordomo at hellug.gr
Ta archives tis listas einai sto http://lists.hellug.gr/archives
prin steilete kapoia erothsh psakte mipos exei hdh apanththei.
Gia opoiodipote problima stilte e-mail ston owner-linux-greek-users at hellug.gr
====================================================================
More information about the Linux-greek-users
mailing list