2010-06-13 07:58:52 -04:00
|
|
|
#include <stdio.h>
|
2015-06-13 14:27:01 -04:00
|
|
|
#include <stdlib.h>
|
2010-06-13 07:58:52 -04:00
|
|
|
|
2009-10-10 10:49:49 -04:00
|
|
|
char a;
|
|
|
|
int b;
|
|
|
|
double c;
|
|
|
|
|
2015-06-13 14:27:01 -04:00
|
|
|
struct P1 {
|
|
|
|
int a;
|
|
|
|
int b;
|
|
|
|
double c;
|
|
|
|
};
|
2009-10-10 10:49:49 -04:00
|
|
|
|
2015-06-13 14:27:01 -04:00
|
|
|
struct P2 {
|
|
|
|
int a;
|
|
|
|
int b;
|
|
|
|
int c;
|
|
|
|
int d;
|
|
|
|
double e;
|
|
|
|
};
|
2010-07-27 12:20:09 -04:00
|
|
|
|
2015-06-13 14:27:01 -04:00
|
|
|
struct P3 {
|
|
|
|
int a;
|
|
|
|
int b;
|
|
|
|
int c;
|
|
|
|
int d;
|
|
|
|
double e;
|
|
|
|
struct P1 *p1;
|
|
|
|
struct P1 *p2;
|
|
|
|
struct P1 *p3;
|
|
|
|
};
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
struct P1 *p1;
|
|
|
|
struct P2 *p2;
|
|
|
|
struct P3 *p3;
|
|
|
|
printf("%d\n", sizeof(*p1));
|
|
|
|
printf("%d\n", sizeof(*p2));
|
|
|
|
printf("%d\n", sizeof(*p3));
|
|
|
|
printf("%d\n", sizeof(a));
|
|
|
|
printf("%d\n", sizeof(b));
|
|
|
|
printf("%d\n", sizeof(c));
|
|
|
|
}
|