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

Is it possible to write a c++ template to check for a function's existence?

565


You have two pairs: new() and delete() and another pair : alloc() and free(). Explain differences between eg. New() and malloc()

580


Is c++ low level?

570


Write about the members that a derived class can add?

559


Which is not an ANSII C++ function a) sin() b) tmpnam() c) kbhit()

993






Can user-defined object be declared as static data member of another class?

544


What is new in c++?

567


To what does “event-driven” refer?

600


Explain selection sorting. Also write an example.

573


Can you declare an array without a size in c++?

563


Is there any function that can skip certain number of characters present in the input stream?

575


What is the difference between an external iterator and an internal iterator? Describe an advantage of an external iterator?

630


what Is DCS ? what i will get benefit when i did?

1827


Which function should be used to free the memory allocated by calloc()?

585


Inline parameters : What does the compiler do with the parameters of inline function, that can be evaluated in runtime ?

2005