#include <cstdio>
struct S {
int val;
};
int main() {
S s[4];
s[0].val = 10;
s[1].val = 20;
s[2].val = 30;
s[3].val = 40;
for ( int i = 0; i < 4; ++i ) printf("s[%d]=%d\n", i, s[i].val );
printf("\n");
S ns = s[1];
ns.val = 100;
// same print
//for ( int i = 0; i < 4; ++i ) printf("s[%d]=%d\n", i, s[i].val );
return 0;
}
I2luY2x1ZGUgPGNzdGRpbz4KCnN0cnVjdCBTIHsKCWludCB2YWw7Cn07CgppbnQgbWFpbigpIHsKCVMgc1s0XTsKCXNbMF0udmFsID0gMTA7CglzWzFdLnZhbCA9IDIwOwoJc1syXS52YWwgPSAzMDsKCXNbM10udmFsID0gNDA7Cglmb3IgKCBpbnQgaSA9IDA7IGkgPCA0OyArK2kgKSBwcmludGYoInNbJWRdPSVkXG4iLCBpLCBzW2ldLnZhbCApOwoKCXByaW50ZigiXG4iKTsKCVMgbnMgPSBzWzFdOwoJbnMudmFsID0gMTAwOwoJLy8gc2FtZSBwcmludAoJLy9mb3IgKCBpbnQgaSA9IDA7IGkgPCA0OyArK2kgKSBwcmludGYoInNbJWRdPSVkXG4iLCBpLCBzW2ldLnZhbCApOwoKCXJldHVybiAwOwp9Cg==