Quick question about pointers.
Wrote this "trying to understand this better" code:
int *ptr, x = 565;
ptr= &x;
printf("\n\n\nT he value of x is %d\n", x);
printf("Now: ptr= &x\n So:");
printf("The value of *ptr is %d\n", *ptr);
printf("And, straight ptr should give an address of \"x\"\n ");
printf("Ptr points at x whose address is is %d\n", ptr); /*<<<<<<<<
returns -1073743224<<<*/
return 0;
}
All except the last line work...or is the memory location indeed
"-1073743224"
Thanks in advance.
Wrote this "trying to understand this better" code:
int *ptr, x = 565;
ptr= &x;
printf("\n\n\nT he value of x is %d\n", x);
printf("Now: ptr= &x\n So:");
printf("The value of *ptr is %d\n", *ptr);
printf("And, straight ptr should give an address of \"x\"\n ");
printf("Ptr points at x whose address is is %d\n", ptr); /*<<<<<<<<
returns -1073743224<<<*/
return 0;
}
All except the last line work...or is the memory location indeed
"-1073743224"
Thanks in advance.
Comment