#include
#include
#include
int i = 1;
int main(void)
{
int j = 10;
int *k = malloc(sizeof(int));
*k = 4;
if (fork()) {
i = i + 1;
j = j 1;
*k = *k * 1;
} else {
i = i + 2;
j = j 2;
*k = *k * 2;
}
printf(i=%d, &i=%p
, i, &i);
printf(j=%d, &j=%p
, j, &j);
printf(k=%d, &k=%p
, *k, &k);
return 0;
}
Reviews
There are no reviews yet.