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 |
sizeof - is it a function or operator?
What are protected members in c++?
How would you use the functions sin(), pow(), sqrt()?
What is difference between malloc()/free() and new/delete?
Why do we need constructors in c++?
What is a .lib file in c++?
differance between copy & clon
How would you find out if a linked-list is a cycle or not?
What is c++ iterator?
How do you add an element to a set in c++?
Can the operator == be overloaded for comparing two arrays consisting of characters by using string comparison?
Is c++ faster than c?