- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
#include <stdio.h>
#include <math.h>
#define SET(var, ...) typeof(__VA_ARGS__) var = __VA_ARGS__
SET(p, &puts);
struct point_t { double x, y; };
SET(point, (struct point_t){0.0, 1.0});
SET(anonymous, (struct{char *s;}){"hui"});
int main(void)
{
static SET(msg, "Halo!");
p(msg);
SET(sqrt_of_2, sqrt(2));
printf("√2 = %f\n", sqrt_of_2);
return 0;
}