Build an array of customer structures

Assignment Help Business Management
Reference no: EM132155326

****C PROGRAMMING****

A local beauty store manager would like to host a VIP beauty event for their top 10 loyal customers. They have gathered some data about their loyal customers including email address, number of items purchased, and first name and last name. Need help in writing a program that read in data from a file, sort the customers by the number of items purchased, and write the top 10 (by the number of items) customers to the output file.

The list of top 10 customers should be written to the same file name as the input file name with "top10_" added at the beginning. For example, if the original file name is customers.txt, the output file name is then top10_customers.txt. 

1. Read the data using fscanf function. To read the name (last item in a line), use "%[^n]n" as the conversion specifier for fscanf function.

2. Define a structure customer to store the email address (string), num_items (integer), and name (string). Assume the email address and name are no more than 100 characters. 

3. Build an array of customer structures. Assume that there are no more than 200 loyal customers. 

4. Modify the selection_sort function provided to sort an array of customers by the number of items purchased. The function's first parameter should be modified to struct customer list[].

5. The output file should include the list of top 10 customers in the same format as the input file but in sorted order by number of items purchased

Reference no: EM132155326

Questions Cloud

Economic downturns throughout recent history : Based on the discussion in the chapter, explain why this might be so, and what the implications are for unemployment.
Indifference curves cannot intersect : A rational consumer's indifference curves cannot intersect. [Hint: Two of the assumptions about preferences are that they are transitive over consumption bundle
Special effects can have positive impact on presentation : Special effects can have a positive impact on your presentation. There is no need to create a customized resume
Prophecy to enhance an individual''s performance : Describe how a manager or coach could use the process of self-fulfilling prophecy to enhance an individual's performance.
Build an array of customer structures : Build an array of customer structures. Assume that there are no more than 200 loyal customers.
Abandoned building into office space or community center : Write an essay in which you argue for turning the abandoned building into office space or a community center.
Interview a purchasing and supply management professional : The line of business, mission, and goals of the organization he/she works for. Describe these briefly.
Police chief of theft city has hired you to evaluate policy : The Police Chief of Theft City has hired you to evaluate a policy.
Accept as well as provide constructive criticism gracefully : Professionals need to accept as well as provide constructive criticism gracefully.

Reviews

Write a Review

Business Management Questions & Answers

  Why the unification of germany proved to be more of a burden

Write a one page paper explaining why the unification of Germany into one country (combining East and West Germany) proved to be more of a burden to the German people than expected.

  Determining the role of advertising

What is the role of advertising in each of the four market structures? As you answer these question, illustrate your points with original examples.

  What is the definition of strategy

What is the definition of strategy c ompare and contrast business strategy and business tactics.

  Explain the communication issue from the scenario

Explain the communication issue from the scenario. Concentrate on the facts of the situation and use either the inductive or deductive approach.

  Specific strengths and weaknesses of branco

Evaluate Branco's performance as a major supplier. Justify your assessment noting specific strengths and weaknesses of Branco's performance.

  Examples of different roles and needs within a team

What are some examples of different roles and needs within a team? How can these roles and needs affect the process of teamwork?

  Develop a daily production schedule

Formulate a linear programming model that can be used to develop a daily production schedule for the Buffalo and Dayton plants that will maximize.

  Explain the role of economic in healthcare

Describe why it is important for healthcare policymaker to be family with basic economic concepts. Explain the role of economic in healthcare.

  Develop a paper to present to the ceo that will outline

You are to develop a paper to present to the CEO that will outline how you are going to turn around the department (your department - hint - you are NOT in charge of production).

  Organization development

organization structure provide at least three thoughts on how you can be an effective change agent for your current or future organization.

  Write an essay on leadership in athens

Write an essay on Leadership in Athens in 1700 words

  Identify potential sources of conflicts in a project

Identify Potential Sources of Conflicts in a project. How can conflicts be resolved? How can project integrity be protected?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd