When volatile can be used?

Answer Posted / mustafa

Volatile restricts the compiler in two ways
1-> No optimization algorithm should be applied to this
variable.
2-> When ever you need the value of the volatile variable
please take it from the memory.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is prototype in c++ with example?

564


What are separators in c++?

624


What is the use of setprecision in c++?

544


Which programming language should I learn first?

579


How do I make turbo c++ full screen?

585






Define the operators that can be used with a pointer.

575


What does obj stand for?

633


What is the difference between an external iterator and an internal iterator? Describe an advantage of an external iterator?

638


How do I write a c++ program?

598


Can I create my own functions in c++?

603


What is the difference between public and private data members?

664


Can create new c++ operators?

575


Write some differences between an external iterator and an internal iterator?

586


How can a called function determine the number of arguments that have been passed to it?

657


If a round rectangle has straight edges and rounded corners, your roundrect class inherits both from rectangle and from circle, and they in turn both inherit from shape, how many shapes are created when you create a roundrect?

669