/* ------------------------------------------------------------------- Note: The address are custimzied for the Linux platform you may need to ADJUST the address values for different platforms Use the address values printed out by the variables printf statement to access the correct memory locations !!! ------------------------------------------------------------- */ #include int i1 = 1234; short s1 = -54; float f1 = 3.14; int main(int argc, char *argv[]) { printf("&i1 (address of int var i1) = %u\n", (unsigned) &i1 ); printf("int value at 6295584 = %d\n", * ( (int*)6295584 ) ); printf("i1 = %d\n\n", i1); printf("&s1 (address of short var s1) = %u\n", (unsigned) &s1 ); printf("short value at 6295588 = %d\n", * ( (short*)6295588 ) ); printf("s1 = %d\n\n", s1); printf("&f1 (address of float var f1) = %u\n", (unsigned) &f1 ); printf("float value at 6295592 = %f\n", * ( (float*)6295592 ) ); printf("f1 = %f\n\n", f1); }