Data Structures declared as Volatile and Const

What does it mean when a data structure is declared volatile?
What does it mean when a data structure is declared Const?

Questions by stacee brackens

Showing Answers 1 - 6 of 6 Answers

as_hmr

  • Mar 11th, 2008
 

If we declare a data structure const means after declration that data structure is read only.

Declaring a data structure Volatile is a order to compiler not to perform optimization on that data structure.

  Was this answer useful?  Yes

pvsola

  • Apr 3rd, 2008
 

Volatile - you are asking compiler to not to optimise the data structure as well as to reload to CPU registers whenever it is in use. Not a good idea for Data structure, will waste lot of CPU time in loading long data structures.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions