Define a structure customer to store the email address

Assignment Help Business Management
Reference no: EM132158581

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: EM132158581

Questions Cloud

What will be the total value of the inflows after five years : If the reinvestment assumption of the net present value method is used, what will be the total value of the inflows after five years
Describe the steps in building brand resonance : Identify all its brand elements and assess their ability to contribute to brand equity according to the choice criteria identified in this chapter.
What is one negative health impact from carbohydrate intake : What is meant by the AMDR, and what is this range for carbohydrates? How does the type of carbohydrate impact health?
How trade between the two countries benefits each of them : Distinguish "absolute advantage" from "comparative advantage" in the context of your example.
Define a structure customer to store the email address : 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
Compute the total supply chain throughput time : Compute the total supply chain throughput time for all the entities from beginning to end - Compute the cash-to-cash cycle time for each of the four entities
What is the net present value of the project : Davis Chili Company is considering an investment of $26,000, What is the net present value of the project based on a 10% discount rate
Record the payment of semiannual interest : On January 31, 2018, LogoLogistics, Inc., issued ten-year, 2% bonds payable with a face value of $12,000,000. Record the payment of semiannual interest
Availability and speed of internet connections play : Lists the 10 countries with the fastest Internet connections. Is the United Sates among the top 10?

Reviews

Write a Review

Business Management Questions & Answers

  Caselet on michael porter’s value chain management

The assignment in management is a two part assignment dealing 1.Theory of function of management. 2. Operations and Controlling.

  Mountain man brewing company

Mountain Man Brewing, a family owned business where Chris Prangel, the son of the president joins. Due to increase in the preference for light beer drinkers, Chris Prangel wants to introduce light beer version in Mountain Man. An analysis into the la..

  Mountain man brewing company

Mountain Man Brewing, a family owned business where Chris Prangel, the son of the president joins. An analysis into the launch of Mountain Man Light over the present Mountain Man Lager.

  Analysis of the case using the doing ethics technique

Analysis of the case using the Doing Ethics Technique (DET). Analysis of the ethical issue(s) from the perspective of an ICT professional, using the ACS Code of  Conduct and properly relating clauses from the ACS Code of Conduct to the ethical issue.

  Affiliations and partnerships

Affiliations and partnerships are frequently used to reach a larger local audience? Which options stand to avail for the Hotel manager and what problems do these pose.

  Innovation-friendly regulations

What influence (if any) can organizations exercise to encourage ‘innovation-friendly' regulations?

  Effect of regional and corporate cultural issues

Present your findings as a group powerpoint with an audio file. In addition individually write up your own conclusions as to the effects of regional cultural issues on the corporate organisational culture of this multinational company as it conducts ..

  Structure of business plan

This assignment shows a structure of business plan. The task is to write a business plane about a Diet Shop.

  Identify the purposes of different types of organisations

Identify the purposes of different types of organisations.

  Entrepreneur case study for analysis

Entrepreneur Case Study for Analysis. Analyze Robin Wolaner's suitability to be an entrepreneur

  Forecasting and business analysis

This problem requires you to apply your cross-sectional analysis skills to a real cross-sectional data set with the goal of answering a specific research question.

  Educational instructional leadership

Prepare a major handout on the key principles of instructional leadership

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