Define a structure customer to store the email address

Assignment Help Business Management
Reference no: EM132151837

****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: EM132151837

Questions Cloud

Sign-and-magnitude representation of integers : A two-byte memory space is used for a sign-and-magnitude representation of integers with BCD, and the sign is stored in MSB.
How awareness of learning styles has influenced perceptions : Compare your current preferred learning strategies to the identified strategies for your preferred learning style. Examine how awareness of learning styles.
Explain key features of best practice in financial planning : EFN421 - Financial Planning and Strategies Assignment - Describe and explain what would be the key features of Best Practice in Financial Planning
Contrast signature based versus anomaly detection firewalls : Compare and contrast signature based versus anomaly detection firewalls.
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
What is that information interesting and useful to you : In 2017, there had been catastrophic event that happened such as the 7.1 Earthquake in Mexico 2018 and multiple Category 5 Hurricanes by Florida and Puerto.
Major role in the success of a gis : Lists the 10 countries with the fastest Internet connections. Is the United Sates among the top 10?
Discuss the route of transmission of the selected disease : Discuss the route of transmission of the selected disease. Discuss how an outbreak of the selected disease would impact your community at a systems level.
Identifies two companies that use mobile analytics : Identifies two companies that use mobile analytics. How has mobile analytics helped these companies achieve their sales goals?

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