i was trying to get output of cout<<&x,
it gave certain address at first run
then at second run it it gave another address
so why address keep on changing of same variable everytime.
Why address keep on changing?
@sarthakj2099,
Because address is allocated on runtime, so every time time your program runs, it allocates a address to your variable, thus there is no guaranty of getting same address allocated.
ok, thanks a lot for your help