#include <stdio.h>
int main()
{
int a = 10; /* a is a variable of type integer */
int *int_ptr; /* int_ptr is a variable which is a pointer to variables of type integer */
int_ptr = &a; /* put the address (not the contents) of a into the variable int_ptr*/
/* since addresses in memory can be quite long, its best */
/* to print them in long hexidecimal format */
printf ("%i %lx %x %lx %i \n", a, &a, int_ptr, &int_ptr, *int_ptr);
int x = 5;
int *ptr;
*ptr = x;
int *xptr = &x;
printf("%i, %i, %i, %xl, %xl, %xl, %xl", x, *ptr, *xptr, &x, ptr, &ptr, xptr);
return (0);
}
I2luY2x1ZGUgPHN0ZGlvLmg+CmludCBtYWluKCkKewogICAgIGludCBhID0gMTA7ICAgICAgICAgIC8qIGEgaXMgYSB2YXJpYWJsZSBvZiB0eXBlIGludGVnZXIgKi8KCiAgICAgaW50ICppbnRfcHRyOyAgICAgICAgLyogaW50X3B0ciBpcyBhIHZhcmlhYmxlIHdoaWNoIGlzIGEgcG9pbnRlciB0byB2YXJpYWJsZXMgb2YgdHlwZSBpbnRlZ2VyICovCiAgICAgICAgICAgICAgICAgICAgCgogICAgaW50X3B0ciA9ICZhOyAgICAgLyogcHV0IHRoZSBhZGRyZXNzIChub3QgdGhlIGNvbnRlbnRzKSBvZiBhIGludG8gdGhlIHZhcmlhYmxlIGludF9wdHIqLwoKICAgIC8qIHNpbmNlIGFkZHJlc3NlcyBpbiBtZW1vcnkgY2FuIGJlIHF1aXRlIGxvbmcsIGl0cyBiZXN0ICovCiAgICAvKiB0byBwcmludCB0aGVtIGluIGxvbmcgaGV4aWRlY2ltYWwgZm9ybWF0ICAgICAgICAgICAgICAqLwogICAgcHJpbnRmICgiJWkgJWx4ICV4ICVseCAlaSBcbiIsIGEsICZhLCBpbnRfcHRyLCAmaW50X3B0ciwgKmludF9wdHIpOwogICAgCiAgICBpbnQgeCA9IDU7CiAgICBpbnQgKnB0cjsKICAgICpwdHIgPSB4OwogICAgaW50ICp4cHRyID0gJng7CiAgICAgCiAgICBwcmludGYoIiVpLCAlaSwgJWksICV4bCwgJXhsLCAleGwsICV4bCIsIHgsICpwdHIsICp4cHRyLCAmeCwgcHRyLCAmcHRyLCB4cHRyKTsKICAgICAKCiAgICByZXR1cm4gKDApOwoKfQ==