#include <stdio.h>
#include <stdlib.h>
typedef struct {
int i;
} Tipo;
int main() {
Tipo x = { .i = 10 };
int y = x.i;
Tipo
*z
= (Tipo
*)malloc(sizeof(Tipo
)); //C++ exige o cast z->i = 10;
y = z->i;
}
//http://pt.stackoverflow.com/q/183066/101
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCnR5cGVkZWYgc3RydWN0IHsKICAgaW50IGk7Cn0gVGlwbzsKCmludCBtYWluKCkgewoJVGlwbyB4ID0geyAuaSA9IDEwIH07CiAgICBwcmludGYoIiVkIiwgeC5pKTsKICAgIGludCB5ID0geC5pOwogICAgcHJpbnRmKCIlZCIsIHkpOwogICAgVGlwbyAqeiA9IChUaXBvICopbWFsbG9jKHNpemVvZihUaXBvKSk7IC8vQysrIGV4aWdlIG8gY2FzdAogICAgei0+aSA9IDEwOwogICAgcHJpbnRmKCIlZCIsIHotPmkpOwogICAgeSA9IHotPmk7CiAgICBwcmludGYoIiVkIiwgeSk7Cn0KCi8vaHR0cDovL3B0LnN0YWNrb3ZlcmZsb3cuY29tL3EvMTgzMDY2LzEwMQ==