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...

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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of using typedef in a program?

1147


what are Access specifiers in C++ class? What are the types?

1236


What is the use of volatile variable?

1089


If horse and bird inherit virtual public from animal, do their constructors initialize the animal constructor? If pegasus inherits from both horse and bird, how does it initialize animal’s constructor?

1213


write a function signature with various number of parameters.

1047


Explain the difference between realloc() and free() in c++?

1019


Why pointer is used in c++?

1169


Which is best ide for c++?

1014


What is name hiding in c++?

1158


what do you mean by volatile variable?

1056


Explain how an exception handler is defined and invoked in a Program.

1180


Can c++ do everything c can?

1089


What flag means?

961


How does com provide language transparency?

1017


Write a note about the virtual member function?

1064