" how to make 800=200(making address 800 as 200) directly... " There's no way you can make memory location 800 as 200. All that you can do is to assign value 200 to the memory location 800, and this definitely is a pointer. The variable representing the 800th memory location is a pointer and it points to the 200th location. As far as I can guess , let there be two pointers int *a = 25 , *b = 35; considering that 'a' represents 200th memory location and 'b' represents 800th memory location , then value of a is some other memory location that holds the value 25, and similarly the pointer 'b', Now *a = *b assigns the value pointed by 800th location to 200th location. Better be clear about you doubt. Most of the time interviewers ask some weird questions to confuse the interviewee that comes straight out of his dumb mind, or something that he is getting confused of but getting no solution. You should be confident to ask the interviewer to explain the question. Do reply for further doubts, Regards, Debasish
Ray Devore <[EMAIL PROTECTED]> wrote: --- uugnaa altaa <[EMAIL PROTECTED]> wrote: > I guess, it is more likely the question about > pointer to pointer. > > useing pointer to pointer, you can store address of > the pointer, that is it. > > int **src, *dst; > dst = 200 > *src = dst; > > something like this .., > > anu radha <[EMAIL PROTECTED]> wrote: > Hello all, > > 2 days back i attended an interview > where i was asked a question.The question is "how to > give one address to other address without the using > any variables".(i.e) suppose one location is 200 and > other is 800 how to make 800=200(making address 800 > as 200) directly....(using only addresses). > > i googled it but did'nt find an appropriate > answer... > > please help.... > > thanx in advance.. > The statement dst = 200; will give an error. You cannot assign an address to a pointer. Ray __________________________________________________________ Need Mail bonding? Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users. http://answers.yahoo.com/dir/?link=list&sid=396546091 Karmennevaya Dhikaraste, Maaphaaleshu Kadaachanah --------------------------------- Heres a new way to find what you're looking for - Yahoo! Answers [Non-text portions of this message have been removed]
