mirror of
https://github.com/sdiehl/write-you-a-haskell.git
synced 2024-09-11 11:46:57 +03:00
17 lines
205 B
C
17 lines
205 B
C
typedef union {
|
|
int a;
|
|
float b;
|
|
} Sum;
|
|
|
|
typedef struct {
|
|
int a;
|
|
float b;
|
|
} Prod;
|
|
|
|
int main()
|
|
{
|
|
Prod x = { .a = 1, .b = 2.0 };
|
|
Sum sum1 = { .a = 1 };
|
|
Sum sum2 = { .b = 2.0 };
|
|
}
|