[ create a new paste ] login | about

Link: http://codepad.org/1QjW8Ip7    [ raw code | output | fork ]

C, pasted on Jun 17:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <stdio.h>

struct Car {
    char manufacturer[20];
    char colour[5];
    struct Person {
        char name[5];
    } owner;
};

int main() 
{
    struct Car vechile;
    strcpy(vechile.manufacturer, "Mercedes");
    strcpy(vechile.colour, "Black");
    strcpy(vechile.owner.name, "Jere");
    printf ("Car's present owner: %s", vechile.owner.name);
    return (0);
}


Output:
1
Car's present owner: Jere


Create a new paste based on this one


Comments: