C++ program to overload prefix and postfix decrement operator by using member function

 

Sample Output
Before prefix decrement a=5 and b=-5
After prefix decrement a=4 and b=-6
Before postfix decrement a=5 and b=-5
After postfix decrement a=4 and b=-6

You may also like...