Answer:
Date Date::operator++( int )
{
Date temp = *this;
Increment();
return temp;
}
Explanation:
Of options 1 through 4, only option 4 correctly implement the post increment of the ++ operator.
Interpreting each line of option for and comparing it to other options
Line 1: Date Date::operator++( int )
This declares the data type and its ++ operator
This is same for all options
Line 2: The Date type needs to be declared
In option 4, it was declared correctly as Date temp = *this; using a pointer variable *this.
Here, option 2 is removed from the list of possible options.
Comparing other options
Line 3: The member increment option needs to be declared after the declaration of the date type variable.
This is correctly declared as Increment(); in option 4
Here, option 3 is removed from the list of possible options.
Comparing other options
Line 4: The value declared variable temp needs to be returned the way it was declared (without pointer indicator)
Hence, option 4 is best appropriate