What is the use of volatile keyword in c++? Give an example.
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 |
What things would you remember while making an interface?
Can we use resume in error handling i.e. in the catch block
Is c++ still being used?
Are vectors faster than arrays?
What is increment operator in c++?
What is the need of a destructor?
What is std::move?
What is the use of 'using' declaration in c++?
What are virtual constructors/destructors?
What is private, public and protected inheritance?
What is the difference between Pointer and a Reference? When you would use them?
What does return 0 do in c++?