What is the use of volatile keyword in c++? Give an example.



What is the use of volatile keyword in c++? Give an example...

Answer / 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

More C++ General Interview Questions

What is the handle class?

1 Answers  


How would you use the functions memcpy(), memset(), memmove()?

0 Answers  


What is the basic difference between C and C++?

0 Answers   NIIT,


How are the features of c++ different from c?

0 Answers  


Does c++ have arraylist?

0 Answers  






What is jump statement in C++?

0 Answers   Ericsson,


Explain the advantages of using friend classes.

0 Answers  


Where are setjmp and longjmp used in c++?

0 Answers  


how can u create a doubly linked list with out using pointers?

2 Answers  


What is the advantage of an external iterator.

0 Answers  


Explain how to initialize a const member data.

0 Answers  


Will this c++ program execute or not?

0 Answers  


Categories