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 parameter does the constructor to an ofstream object take?

613


Explain how to initialize a const data member.

598


What is c++ array?

554


What is the best free c++ compiler for windows?

591


Is c++ used anymore?

594






Does c++ cost money?

584


Is set c++?

570


What are the advantages of early binding?

608


When should overload new operator on a global basis or a class basis?

615


Where can I run c++ program?

605


What are default parameters? How are they evaluated in c++ function?

669


What is basic if statement syntax?

566


What is the difference between *p++ and (*p)++ ?

781


Write about the scope resolution operator?

618


What is the purpose of extern storage specifier?

625