#import <Foundation/Foundation.h>
int main( ) {
NSAutoreleasePool * pool = [ NSAutoreleasePool new] ;
int var = 20 ; /* declaracion de una variable */
int * ip; /* declaracion de un puntero */
ip = & var; /*Guardar direccion de var en ip*/
NSLog( @"Direccion de memoria de var: %x\n " , & var ) ;
NSLog( @"Direccion guardada en ip: %x\n " , ip ) ;
/* Acceder al valor usando el puntero ip */
NSLog( @"Value of *ip variable: %d\n " , * ip ) ;
[ pool drain] ;
return 0 ;
}
I2ltcG9ydCA8Rm91bmRhdGlvbi9Gb3VuZGF0aW9uLmg+CgppbnQgbWFpbigpIHsKCU5TQXV0b3JlbGVhc2VQb29sICpwb29sID0gW05TQXV0b3JlbGVhc2VQb29sIG5ld107CglpbnQgdmFyID0gMjA7ICAgLyogZGVjbGFyYWNpb24gZGUgdW5hIHZhcmlhYmxlICovCiAgICBpbnQgKmlwOyAgICAgICAgLyogZGVjbGFyYWNpb24gZGUgdW4gcHVudGVybyAqLwogICAgCiAgICBpcCA9ICZ2YXI7ICAvKkd1YXJkYXIgZGlyZWNjaW9uIGRlIHZhciBlbiBpcCovCiAgICAKICAgIE5TTG9nKEAiRGlyZWNjaW9uIGRlIG1lbW9yaWEgZGUgdmFyOiAleFxuIiwgJnZhciAgKTsKICAgIE5TTG9nKEAiRGlyZWNjaW9uIGd1YXJkYWRhIGVuIGlwOiAleFxuIiwgaXAgKTsKICAgIC8qIEFjY2VkZXIgYWwgdmFsb3IgdXNhbmRvIGVsIHB1bnRlcm8gaXAgKi8KICAgIE5TTG9nKEAiVmFsdWUgb2YgKmlwIHZhcmlhYmxlOiAlZFxuIiwgKmlwICk7CglbcG9vbCBkcmFpbl07CglyZXR1cm4gMDsKfQoKCg==