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 |
Can we generate a C++ source code from the binary file?
What do you mean by funtion prototype?
Which software is used for c++ programming?
What is null c++?
What is abstraction in c++ with example?
Explain the use of this pointer?
What is the output of printf("%d")?
58 Answers CTS, HCL, Infosys, TCS, Winit, Wipro,
What are virtual constructors/destructors?
Should a constructor be public or private?
Is there anything you can do in C++ that you cannot do in C?
How Virtual functions call up is maintained?
what is Member Functions in Classes?