void data2( );//如果沒有這一行呢?
int j=0;
int main( )
{
int i=2;
i++;
j++;
printf("main i address : %p\n",&i);
printf("main j address : %p\n",&j);
printf("1main i=%d \n",i);
printf("1main j=%d \n",j);
data( );
data2( );
printf("2main i=%d \n",i);
printf("2main j=%d \n",j);
data( );
data2( );
return 0;
}
void data( )
{
int i=5;
i++;
j++;
printf("data i address : %p\n",&i);
printf("data j address : %p\n",&j);
printf("data i=%d \n",i);
printf("data j=%d \n",j);
}
void data2( )
{
int i=5;
i+=100;
j+=100;
printf("data2 i address : %p\n",&i);
printf("data2 j address : %p\n",&j);
printf("data2 i=%d \n",i);
printf("data2 j=%d \n",j);
}
沒有留言:
張貼留言