What is the use of volatile keyword in c++? Give an example.
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 |
What is a NULL Macro? What is the difference between a NULL Pointer and a NULL Macro?
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?
Should I learn c or c++ or c#?
What do you mean by Stack unwinding?
What is a container class?
What is pure virtual function?
What does std mean in c++?
Assume an array of structure is in order by studentID field of the record, where student IDs go from 101 to 500. Write the most efficient pseudocode algorithm you can to find the record with a specific studentID if every single student ID from 101 to 500 is used and the array has 400 elements. Write the most efficient pseudocode algorithm you can to find a record with a studentID near the end of the IDs, say in the range from 450 to 500, if not every single student ID in the range of 101 to 500 is used and the array size is only 300
What is the copy-and-swap idiom?
Is c++ a difficult language?
What is the protected keyword used for?
What is the use of ‘using’ declaration?