A- Write a C++ program to define a record of student (struct) called contactType that contains the following members: - contact ID: int - contact name: string - Phone: int - address: string B- Then create a copy of student record called contact1 of type contactType. C- Initialize the record by the following values: contact ID = 1, contact name= "Your Name", phone=123 , address= "any address" D- Print the record information on the screen.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter4: More Object Concepts
Section: Chapter Questions
Problem 2RQ
icon
Related questions
Question

c++

(1) Struct
A- Write a C++ program to define a record of student (struct) called contactType that contains
the following members:
- contact ID: int
- contact name: string
- Phone: int
- address: string
B- Then create a copy of student record called contact1 of type contactType.
C- Initialize the record by the following values:
contact ID = 1, contact name= "Your Name", phone=123 , address= "any address"
D- Print the record information on the screen.
Transcribed Image Text:(1) Struct A- Write a C++ program to define a record of student (struct) called contactType that contains the following members: - contact ID: int - contact name: string - Phone: int - address: string B- Then create a copy of student record called contact1 of type contactType. C- Initialize the record by the following values: contact ID = 1, contact name= "Your Name", phone=123 , address= "any address" D- Print the record information on the screen.
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Function Arguments
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT