|
|
|
|
Posted 2004-11-27, 01:18 PM
|
|
|
|
I need some help I only now what its going to output but the only problem which I do not know how is trace the execution.
#include <stdio.h>
main()
struct aa{
int x;
char z; } *p, *q;
p=(struct aa*)malloc (sizeof(struct aa));
p-> x=5;
p-> z='X';
printf("x's field %d, z's field %c \n", p->x, p->z);
free(p);
q=(struct aa*)malloc (sizeof(struct aa));
q-> x=6;
q-> z='Y';
printf("x's field %d, z's field %c\n", p->x, p->z);
printf("with q x's field %d, z's field %c\n", q->x, q->z);
}
|
|
|
|
|
|
|
|
|
|
|