aboutsummaryrefslogtreecommitdiffhomepage
path: root/test2.c
blob: 7d391642f65df0ff15f242c89c6d05018a0c39ca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
typedef struct v2d { double x,y; } v2d;



void addp(v2d *a, const v2d *b)
{
    a->x += b->x;
    a->y += b->y;
}

v2d add(v2d a, v2d b)
{
    addp(&a, &b);
    return a;
}

short s(int a, int b) {
    return a + b;
}

int i() {
    return s(1,2);
}