Which is faster post increment or pre increment ? and in
which cases should u use either - to increase speed?
Answer Posted / mms zubeir
The above answer seems to be correct but for normal cases
also the behavior is as explained, it is not only for
overloaded case.
A little deeper, since a temporary object is introduced to
swap older and newer values, extra copying is required
which swallow its own CPU time. So the post increment
operator is a bit slower.
But this difference is feeble.
| Is This Answer Correct ? | 16 Yes | 1 No |
Post New Answer View All Answers
What is encapsulation in ict?
What is overriding vs overloading?
What are different oops concepts?
What is difference between oop and pop?
How many human genes are polymorphic?
Get me an image implementation program.
Why we use classes in oop?
What is an advantage of polymorphism?
class type to basic type conversion
What is destructor example?
What is abstraction example?
What is the main feature of oop?
What do you mean by variable?
Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.
2. Give the different notations for the class.\