#import <Foundation/Foundation.h>
int main() {
NSAutoreleasePool *pool = [NSAutoreleasePool new];
int n[ ] = { 11, 22, 33, 44 }; /* n is an array of 4 integers with the values especified */
/* initialize elements of array n to 0 */
int i;
for(i = 0; i < 4; i++ ) {
n[ i ] = n[ i ]+100; /* set element at location i to n[ i ] + 100 */
}
/* output each array element's value */
int j;
for(j = 0; j < 4; j++ ) {
NSLog(@"Element[%d] = %d\n", j, n[j] );
}
[pool drain];
return 0;
}
I2ltcG9ydCA8Rm91bmRhdGlvbi9Gb3VuZGF0aW9uLmg+CgppbnQgbWFpbigpIHsKCU5TQXV0b3JlbGVhc2VQb29sICpwb29sID0gW05TQXV0b3JlbGVhc2VQb29sIG5ld107CglpbnQgblsgXSA9IHsgMTEsIDIyLCAzMywgNDQgfTsgIC8qIG4gaXMgYW4gYXJyYXkgb2YgNCBpbnRlZ2VycyB3aXRoIHRoZSB2YWx1ZXMgZXNwZWNpZmllZCAqLwogICAgCiAgICAvKiBpbml0aWFsaXplIGVsZW1lbnRzIG9mIGFycmF5IG4gdG8gMCAqLwogICAgaW50IGk7CiAgICBmb3IoaSA9IDA7IGkgPCA0OyBpKysgKSB7CiAgICAgICAgblsgaSBdID0gblsgaSBdKzEwMDsgLyogc2V0IGVsZW1lbnQgYXQgbG9jYXRpb24gaSB0byBuWyBpIF0gKyAxMDAgKi8KICAgIH0KICAgIAogICAgLyogb3V0cHV0IGVhY2ggYXJyYXkgZWxlbWVudCdzIHZhbHVlICovCiAgICBpbnQgajsKICAgIGZvcihqID0gMDsgaiA8IDQ7IGorKyApIHsKICAgICAgICBOU0xvZyhAIkVsZW1lbnRbJWRdID0gJWRcbiIsIGosIG5bal0gKTsKICAgIH0KCVtwb29sIGRyYWluXTsKCXJldHVybiAwOwp9Cg==