C++ OOP PART 1: A phone number, such as (212) 767-8900, can be thought of as having three parts: the area code (212), the exchange (767), and the number (8900). Write a program that uses a structure to store these three parts of a phone number separately. Call the structure phone. Create two structure variables of type phone. Initialize one, and have the user input a number for the other one. Then display both numbers. The interchange might look like this:  Enter your area code, exchange, and number: 415 555 1212  My number is (212) 767-8900  Your number is (415) 555-1212 PART 2: Differentiate between deep and shallow copy with suitable code.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter13: Structures
Section13.1: Single Structures
Problem 4E
icon
Related questions
Question

C++ OOP PART 1: A phone number, such as (212) 767-8900, can be thought of as having three parts: the area code
(212), the exchange (767), and the number (8900). Write a program that uses a structure to store these
three parts of a phone number separately. Call the structure phone. Create two structure variables of type
phone. Initialize one, and have the user input a number for the other one. Then display both numbers.
The interchange might look like this:
 Enter your area code, exchange, and number: 415 555 1212
 My number is (212) 767-8900
 Your number is (415) 555-1212
PART 2: Differentiate between deep and shallow copy with suitable code.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Header Files
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr