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 is c++ array?

765


What are c++ variables?

780


Will a catch statement catch a derived exception if it is looking for the base class?

742


What is the difference between strcpy() and strncpy()?

841


Should I learn c++ c?

809


What is while loops?

805


What is lambda in c++?

883


Which format specifier is used for printing a pointer value?

775


If there are two catch statements, one for base and one for derived, which should come first?

765


What is the latest version on c++?

868


What is scope operator in c++?

807


What is meant by iomanip in c++?

836


What is c++ in english?

810


What are protected members in c++?

859


How many keywords are used in c++?

766