How to change constant values?

Answer Posted / udit

const int var=10;
*(int *)&var=20;
this syntex change the constat value

Is This Answer Correct ?    15 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a string example?

550


How can you quickly find the number of elements stored in a static array?

640


What is the use of object in c++?

570


Is arr and &arr are same expression for an array?

585


how to connect with oracle 9i with server in socket program in c/c++

1851






the maximum length of a character constant can be a) 2 b) 1 c) 8

602


What are vtable and vptr?

624


What is a memory leak c++?

592


What is pointer to array in c++?

621


Define a constructor?

593


Do vectors start at 0?

596


In the derived class, which data member of the base class are visible?

644


What is the difference between a baller and a reference in C++?

578


How will you call C functions from C ++ and vice-versa?

661


Define basic type of variable used for a different condition in C++?

670