Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Rather than publish all 50,000 plus compromised records here, I culled a subset of them to examine in pii.dat. Create an structure to hold the

Rather than publish all 50,000 plus compromised records here, I culled a subset of them to examine in pii.dat.

  1. Create an structure to hold the 10 items of each record and initialize each member to the null string "". It is advisable, since this is a template and not a variable, to make the structure declaration global.
  2. Ask the user to input the name of the data file to process and open it.
  3. Read the number of records, n, then create an array of n structures to hold the data from the records.
  4. Read or skip over the column headers. We will not be using them in this assignment.
  5. Read the remaining records into the array of structures.
  6. Close the input file stream.
  7. Display ALL of the records showing only the following data items in the format shown. Notice we are using only 4 of the 10 fields.
image text in transcribed
1 16 NAME : Jonah Dorsey ADDRESS: 910 Green Bay Way, Clyde, TX 79510 PHONE : (325) 492-9188 EMAIL : dorseyDSF@teleosaurs . xyz NAME : Madalyn Harrison ADDRESS: 5122 Douglas Blvd, Osterburg, PA 16667 PHONE : (814) 453-4576 EMAIL: harrisoncF7@teleosaurs . xyz NAME : Cara Mejia ADDRESS : 1743 Wacker Lane, Tallahassee, FL 32313 PHONE : (850) 682-2719 EMAIL: mejiamkE@teleosaurs . xyz etc. Challenge (optional): Sort the array of structures by name before displaying them

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Programming questions