view struct-c.c @ 2:bf65d90b8dc8

*** empty log message ***
author kinjo
date Mon, 28 Nov 2005 13:34:57 +0900
parents e59ebf6fe2b0
children
line wrap: on
line source

extern int printf(char*,...);
struct obj {
    int i;
    char **arg;
};
int
main()
{
    struct obj o;
    char *str[3]={"aho", "huga", "hoge"};
    o.i=0;
    o.arg=str;
    for(o.i=0; o.i<3; o.i++){
	printf("%x\n", (unsigned long)o.arg[o.i]);
    }
    return 0;
}