#include <stdio.h>
struct Datario {int giorno; int mese; int anno;};
void f (struct Datario d)
{
unsigned int indirizzo = (int) &d;
d.giorno = 28;
d.mese = 2;
d.anno = 2007;
printf ("data %i-%i-%i inserita all'indirizzo %u\n", d.giorno, d.mese, d.anno, indirizzo);
}
int main (void)
{
struct Datario data = {31, 12, 2007};
unsigned int ind = (int) &data;
f (data);
printf ("data %i-%i-%i inserita all'indirizzo %u\n", data.giorno, data.mese, data.anno, ind);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgpzdHJ1Y3QgRGF0YXJpbyB7aW50IGdpb3JubzsgaW50IG1lc2U7IGludCBhbm5vO307Cgp2b2lkIGYgKHN0cnVjdCBEYXRhcmlvIGQpCnsKICAgIHVuc2lnbmVkIGludCBpbmRpcml6em8gPSAoaW50KSAmZDsKICAgIGQuZ2lvcm5vID0gMjg7CiAgICBkLm1lc2UgPSAyOwogICAgZC5hbm5vID0gMjAwNzsKICAgIHByaW50ZiAoImRhdGEgJWktJWktJWkgaW5zZXJpdGEgYWxsJ2luZGlyaXp6byAldVxuIiwKICAgICAgICAgICAgIGQuZ2lvcm5vLCBkLm1lc2UsIGQuYW5ubywgaW5kaXJpenpvKTsKfQoKaW50IG1haW4gKHZvaWQpCnsKICAgIHN0cnVjdCBEYXRhcmlvIGRhdGEgPSB7MzEsIDEyLCAyMDA3fTsKICAgIHVuc2lnbmVkIGludCBpbmQgPSAoaW50KSAmZGF0YTsKICAgIGYgKGRhdGEpOwogICAgcHJpbnRmICgiZGF0YSAlaS0laS0laSBpbnNlcml0YSBhbGwnaW5kaXJpenpvICV1XG4iLAogICAgICAgICAgICAgZGF0YS5naW9ybm8sIGRhdGEubWVzZSwgZGF0YS5hbm5vLCBpbmQpOwogICAgcmV0dXJuIDA7Cn0=