How to change constant values?

Answer Posted / asif karim

#include <stdio.h>
#include<iostream>
using namespace std;

void main()
{
const int var=10;
int a;
a=*(int* )& var=20;
cout<<a;
}

Is This Answer Correct ?    3 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by “this” pointer?

586


What is type of 'this' pointer?

573


Is there a c++ certification?

579


What is copy constructor? Can we make copy constructor private in c++?

567


How is c++ different from java?

533






What is an associative container in c++?

526


What are the methods of exporting a function from a dll?

625


how to explain our contribution in the project?

3044


What methods can be overridden in java?

644


What are the two types of comments, and how do they differ?

556


What is the importance of mutable keyword?

562


What do you mean by static variables?

575


Is C++ case sensitive a) False b) Depends on implementation c) True

591


What is a pointer with example?

638


What is the difference between prefix and postfix versions of operator++()?

569