Print the Address a Pointer Contains in C -
I want to do something that sounds quite easy. I get results but the problem is, I do not know the results are correct.
I am working in C and I have two signs; I want to print the contents of the pointer. I do not want to notify the pointer to get the price indicator, I just want the address that the indicator has submitted.
I have written the following code and what do I need to know if it is correct or not, how can I correct it?
/ * item is a parameter and it comes in the form: const zero * item1 * / const emp * emp1 = (const emp *) item1; Printf ("\ n comp1-> emp1 =% p; item1 =% p \ n", emp1, item1);
When I am posting it (and the reason it is important that it is correct) is that I finally have to do this for point-to-a-pointers. That is:
const ampe ** emp1 = (const emp **) item1; Of course, you will see that the same pointers in emp1 and item1 Value is.
Comments
Post a Comment