How to change constant values?
Answers were Sorted based on User's Feedback
Answer / udit
const int var=10;
*(int *)&var=20;
this syntex change the constat value
| Is This Answer Correct ? | 15 Yes | 10 No |
Answer / 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 |
Is c++ a difficult language?
What is the full form of c++?
Explain the difference between static and dynamic binding of functions?
What is conditions when using boolean operators?
What is an ABC: an "Abstract Base Class"?
Does there exist any way to make the command line arguments available to other functions without passing them as arguments to the function?
What is ios :: in in c++?
What are the advantages of using typedef in a program?
What is an action class?
Is there finally in c++?
How to stop conversions among objects?
Difference between static global and global?
16 Answers Microsoft, Symphony, Wipro,