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 |
How do you clear a map in c++?
What is the default access level?
List out function which we can call without using object
What are the new features that iso/ansi c++ has added to original c++ specifications?
Explain the difference between c & c++?
What's c++ used for?
What are static and dynamic type checking?
How do you traverse a btree in backward in-order?
What is the Difference between "C structure" and "C++ structure"?
Why was c++ made?
What is class invariant?
Write a program to calculate the following i want a c++program for this condition 1+4+9+16+….+100 Like this (1^2+2^2) Hint use function pow(a,b)