Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


When volatile can be used?

Answers were Sorted based on User's Feedback



When volatile can be used?..

Answer / reejusri

One more thing i want to add in above answer that is if
compiler sees keyword volatile it skips that variable from
optimization of code, becasue since it is very dymanic in
nature and to manage such type of variable for
optimaization is costly.

Is This Answer Correct ?    7 Yes 0 No

When volatile can be used?..

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

When volatile can be used?..

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

More C++ General Interview Questions

How can an improvement in the quality of software be done by try/catch/throw?

0 Answers  


What is an overflow error?

0 Answers  


How much is size of struct having 1 char & 1 integer?

11 Answers   Persistent,


What kind of jobs can I get with c++?

0 Answers  


without if else statement can be written ah

0 Answers  


What is the use of structure in c++?

0 Answers  


What is the difference between a copy constructor and an overloaded assignment operator?

4 Answers   Belzabar, Citrix, Microsoft, Wipro,


How many storage classes are available in C++?

1 Answers  


Why is null pointer used?

0 Answers  


What are function prototypes?

0 Answers  


Can you please explain the difference between overloading and overriding?

0 Answers  


What is #include iomanip?

0 Answers  


Categories