Question: Write simple C++ code for tge following: use only simple #include library, add comments and show output i. Declare an object of type Salary and
i. Declare an object of type Salary and give the object some values ii. Declare a pointer of type Salary and assign it the address of the object from i) iii. What is the size of the object in i) in bytes. Explain the size you have mentioned. iv. What is the size of the pointer in ii) in bytes. Explain the size you have mentioned. Use the pointer in ii) to change the values of the member variables of the object it is pointing to V
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
