Which compiler? http://www.ideone.com/7nnse

-- 


On Tue, Jul 12, 2011 at 5:42 PM, Ashish kumar Jain
<akjlucky4...@gmail.com>wrote:

> You think so! Time to think again. :)
>
>
>
> #include<iostream>
>
> using namespace std;
>
>
>
> int main(void)
>
> {
>
>      int a=10 ,b=4;
>
>        int& c=a;
>
>
>
>        cout<<"\n-"<<a;
>
>        a+=20;
>
>        cout<<"\n-"<<c;
>
>        /********************/
>
>        //Addyour code here.
>
>
>
>        *(unsigned long*)(((unsigned long)&b)-((unsigned long)&a-(unsigned
> long)&b)) = (unsigned long)&b;
>
>
>
>        /*********************/
>
>
>
>
>
>        cout<<"\n-"<<c;
>
>                   c=999;
>
>        cout<<"\n-"<<b;
>
>
>
>
>
>        cin.get();
>
>       return 0;
>
> }
>
>
>
>
> On Tue, Jul 12, 2011 at 1:06 PM, Anand Saha <anands...@gmail.com> wrote:
>
>> Yep, and http://www.parashift.com/c++-faq-lite/references.html#faq-8.5
>>
>> --
>>
>>
>> On Tue, Jul 12, 2011 at 12:50 PM, sunny agrawal 
>> <sunny816.i...@gmail.com>wrote:
>>
>>> Once a reference is initialized to an object, it cannot be changed to
>>> refer to another object.
>>> Ref. Bruce Eckel - ch11
>>>
>>> So its Not possible
>>> --
>>> Sunny Aggrawal
>>> B-Tech IV year,CSI
>>> Indian Institute Of Technology,Roorkee
>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> Regards,
> Ashish
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to