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 is virtual destructor ans explain its use?
How do you remove an element from a set in c++?
What is :: operator in c++?
what is the use of void main() in C++ language?
Write a program for Divide a number with 2 and Print the output ( NOTE: Check for divide by zero error).
How can an improvement in the quality of software be done by try/catch/throw?
What is called array?
Which software is best for coding?
In the derived class, which data member of the base class are visible?
What does ctime() do?
What is vectorial capacity?
What is encapsulation in C++? Give an example.
Why do we need constructors in c++?
Is atoi safe?
How do you find out if a linked-list has an end? (I.e. The list is not a cycle)