2. Program to swap two numbers using class template.
3. Write a program that uses a structure to store these 3 parts of a phone no. separately call structure phone create two structure variable of type phone. Initialize one and have the input from user for another no. and display both the nos.
4. Write a function called power that takes double value for n and int value for p and return the result as double. use default argument of 2 for p if this argument is omitted.
5. A hospital wants to create a database regarding its indoor patients. The information to store include :- Name of the patient, Date of admission, Disease, Date of discharge.
7. Create two classes DM and DB which store the value of distances. DM stores in meters and centimeters and DB in feet and inches. Write a program that can read values for the class objects and add one object of DM with another object of DB.Use a friend function to carry out the addition operation. The object that stores the results maybe DM object or DB object depending on the units in which the results are required. The display should be in the format of feet and inches or meters and centimeters depending on object on display.
8. Addition of two coordinates
9. Calculator implementation using switch