-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
34 lines (31 loc) · 782 Bytes
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <assert.h>
#include <stdlib.h>
#include <math.h>
#include <stdio.h>
#include <complex.h>
#include <stdnoreturn.h>
#include <uchar.h>
#include <stdatomic.h>
#include <stdalign.h>
#define acos(X) _Generic((X), \
long double complex: cacosl, \
double complex: cacos, \
float complex: cacosf, \
long double: acosl, \
float: acosf, \
default: acos \
)(X)
int main()
{
const int alignas(double) b = 42;
assert(b == 42);
//static_assert(1 + 1 == 2, "");
//printf("%f", cos(0.0));
const int sz = 1 + (rand() % 10);
printf("sz: %i\n", sz);
int x[sz];
const int sz_again = sizeof(x) / sizeof(int);
printf("sz_again: %i\n", sz_again);
for (int i=0; i!=sz; ++i) { x[i] = i; }
for (int i=0; i!=sz; ++i) { printf("%i\n", x[i]); }
}