Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: (untagged)
If the value stored in memory location i=5 and address 65522, what is the value of *(&(*i))?
Posted
Updated 5-May-14 18:20pm
v2
Comments
Sergey Alexandrovich Kryukov 6-May-14 1:38am    
How about solving this problem by yourself? Faced any problems? What did you try?
—SA
Member 10791767 6-May-14 1:55am    
In my opinion
1. *i= value in the memory location with address 5 (for ex:200)
2. &*i=address where 200 is stored ie, taking 200 as a value (for ex:6505)
3. *&*i=value in the memory address 6505 which is equal to 200.
Am i correct or did some misake.
Richard MacCutchan 6-May-14 3:12am    
Why not create a small test program to try it out?

1 solution

Quote:
*(&(*i))

Such expression doesn't make sense, because i is an integer variable and cannot be dereferenced. You may try yourself with a C compiler.
 
Share this answer
 
v2
Comments
Member 10791767 6-May-14 4:57am    
you mean *i is not possible?
CPallini 6-May-14 5:01am    
If i is an integer variable then *i is not possible.
Member 10791767 6-May-14 5:28am    
Yes i got it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900