What is optimization in c++?
when using volatile.optimization is not possible..what does
this mean?
Answer / sindhu
In C, the keyword Volatile tells the compiler that the value
of that variable may change unexpectedly(not using the code
that is found nearby).So the optimizer must do nothing to
the variable to make the code efficient.
| Is This Answer Correct ? | 0 Yes | 0 No |
Describe new operator and delete operator?
When the constructor of a base class calls a virtual function, why doesn't the override function of the derived class gets called?
What is the purpose of the "delete" operator?
How the programmer of a class should decide whether to declare member function or a friend function?
What does extern mean in a function declaration in c++?
What is difference between class and structure in c++?
Can a Structure contain a Pointer to itself?
What is this pointer in c++?
Name some pure object oriented languages?
class Alpha { public: char data[10000]; Alpha(); ~Alpha(); }; class Beta { public: Beta() { n = 0; } void FillData(Alpha a); private: int n; }; How do you make the above sample code more efficient? a) If possible, make the constructor for Beta private to reduce the overhead of public constructors. b) Change the return type in FillData to int to negate the implicit return conversion from "int" to "void". c) Make the destructor for Alpha virtual. d) Make the constructor for Alpha virtual. e) Pass a const reference to Alpha in FillData
Why pointer is used in c++?
What is ctime c++?