You can greatly simplify the neighbor calculations using modulo math:
/*******************************************************************************/
/* compute neighboring cells */
void neighbours(int world1[8][8],int world2[8][8])
{
int a = 0;
for(int i=0;i<SIZEX;i++)
{
int above = (i+SIZEX-1)%SIZEX;
int below = (i+1)%SIZEX;
for(int j=0;j<SIZEY;j++)
{
int left = (j+SIZEY-1)%SIZEY;
int right = (j+1)%SIZEY
a += world1[above][left];
a += world1[above][j];
a += world1[above][right];
a += world1[i][left];
a += world1[i][right];
a += world1[below][left];
a += world1[below][j];
a += world1[below][right];
if((world1[i][j]==0)&&(a==3)){world2[i][j]=1;}
if((world1[i][j]==1)&&((a==2)||(a==3))){world2[i][j]=1;}
if((world1[i][j]==1)&&((a==1)||(a==0)||(a>3))){world2[i][j]=0;}
}
}
}