Ubuntu Pastebin

Paste from hoxily at Thu, 29 Jan 2015 13:06:11 +0000

Download as text
 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
#include <stdio.h>
struct Point
{
    int x;
    int y;
    int z;
};
struct Point MakePoint(x, y, z)
{
    struct Point p;
    p.x = x;
    p.y = y;
    p.z = z;
    p;// not return
}
int main(void)
{
    struct Point p0;
    struct Point p1;
    p0.x = 0;
    p0.y = 1;
    p0.z = 2;
    printf("(%d,%d,%d)\n", p0.x, p0.y, p0.z);
    p1 = MakePoint(-1, -2, -3);
    printf("(%d,%d,%d)\n", p1.x, p1.y, p1.z);
    return 0;
}
Download as text