eci/tests/39_typedef.c
2014-01-16 21:52:25 +01:00

27 lines
332 B
C

#include <stdio.h>
typedef int MyInt;
MyInt a = 1;
printf("%d\n", a);
struct FunStruct
{
int i;
int j;
};
typedef struct FunStruct MyFunStruct;
MyFunStruct b;
b.i = 12;
b.j = 34;
printf("%d,%d\n", b.i, b.j);
typedef MyFunStruct *MoreFunThanEver;
MoreFunThanEver c = &b;
printf("%d,%d\n", c->i, c->j);
void main() {}