modifying const in c++


 void fun( const int & k)
    {
      cout << k;
    }
 
    int main()
    {
      const int i=10;
 
      int *p=(int*)&i;
      *p=15;
      cout<< i;
      cout<<*(&i);
      cout<<*p;
      fun(i);
      }
What will be the output and reason for the same.

Popular posts from this blog