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 the history of c++?

563


What are stacks? Give an example where they are useful.

598


When we use Abstract Class and when we use Interface?where we will implement in real time?

1674


What is a NULL Macro? What is the difference between a NULL Pointer and a NULL Macro?

628


What is stack unwinding?

615






What is general format for a prototype?

603


What do you mean by vtable and vptr in c++?

631


Can you help me with this one? Make a program that when a user inputed a Product Name, it will display its price, and when the user inputed the quantity of the inputed product, it will show its total price. The output must be like this: Product Name: Price: Quantity: Total Price: ..this is the list of products to be inputed: Cellphone - 1500 Washing Machine - 5200 Television - 6000 Refrigirator - 8000 Oven - 2000 Computer - 11000 thanks..:D

3080


Can we use this pointer inside static member function?

636


What is called array?

624


What is null pointer and void pointer?

631


What is the use of lambda in c++?

587


Write a program using merge () function to combine the elements of array x[ ] and y[ ] into array z[ ].

616


What is the use of endl in c++?

605


Explain differences between alloc() and free()?

584