C++ Object Oriented Programming Past Year Question Pointer Question (Destructor)

Question 2                    [25 Marks]
a. Consider the class Data and functions increaseDataValue and decreaseDataValue in Program 1 below.
Part 1(Basic Pointer Knowledge)
Solution

after press F11,the output display is
Part 2(Pointer)
a=100
b=100 //perasan tak dekat void function tu tak dak "&",so dia tak return any value.Void kan non return value  function.So no changes happen
c=95

Part 3 (Destructor)

the output will become


Post a Comment

0 Comments