What is the use of volatile keyword in c++? Give an example.
Answer Posted / hrpynux@gmail.com
The volatile keyword is intended to prevent the compiler from applying any optimizations on objects that can change in ways that cannot be determined by the compiler. Objects declared as volatile are omitted from optimization because their values can be changed by code outside the scope of current code at any time.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the advantages of using typedef in a program?
what are Access specifiers in C++ class? What are the types?
What is the use of volatile variable?
If horse and bird inherit virtual public from animal, do their constructors initialize the animal constructor? If pegasus inherits from both horse and bird, how does it initialize animal’s constructor?
write a function signature with various number of parameters.
Explain the difference between realloc() and free() in c++?
Why pointer is used in c++?
Which is best ide for c++?
What is name hiding in c++?
what do you mean by volatile variable?
Explain how an exception handler is defined and invoked in a Program.
Can c++ do everything c can?
What flag means?
How does com provide language transparency?
Write a note about the virtual member function?