When volatile can be used?

Answer Posted / qqlin

it means this value will be changed unexpectedly. everytime
the program wants to use it, it can only be got from memory
but not from the register directly.

if you want a variable can be accessed by several threads,
you need this key word, like in ISR program, etc.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does flush do c++?

666


Is c++ still in demand?

741


What is a linked list in c++?

662


Write my own zero-argument manipulator that should work same as hex?

691


What are the advantage of using register variables?

745






Do you know about latest advancements in C++ ?

761


What are put and get pointers?

703


What is the iunknown interface?

777


Define anonymous class.

713


Explain how overloading takes place in c++?

666


Explain how a pointer to function can be declared in C++?

664


What apps are written in c++?

708


declare an array of structure where the members of the structure are integer variable float variable integer array char variable access all elements of the structure using dot operator and this pointer operator

1844


What is ctime c++?

693


What is the difference between function overloading and operator overloading?

666