Expert Answer:write a c program with codeblocks

Answer & Explanation:Hi,Please write a program by using C language and use codeblocks to write the program. Also, please while writing the program add comments on every step you take, explaining the steps and functions that you used ,for example( printf is used to print the following statement…) and so on .Thank you 😀
codeblocks.png

bubsort.pdf

raw2.txt

raw1.txt

Unformatted Attachment Preview

EEEN20010
Computer Engineering
“The bubble sort algorithm”
(bubsort)
You are expected to demonstrate a working C program according to the description below. Your program
should be uploaded (via Brightspace) before the deadline. You must use the file name specified in the problem
description below. Late submissions will not be corrected and will receive zero credit, so even if your program
is not running correctly, you should submit your “best attempt”.
Program description
A common application in programming is that of reading data records from a text file and sorting the records
into alphabetical order. In this programming assignment, you are asked to read in student names and marks from
a short data file, and to provide an output with the names in alphabetical order. You may assume a maximum
number of 100 students. The files raw1.txt and raw2.txt are provided as examples of files containing
records to be sorted. You should output the sorted records to a file called sorted.txt. For example, the file
raw1.txt is as follows:
Sheridan, Donal
Cahill, Catherine
Byrne, Geraldine
Ryan, Elizabeth
Lawlor, Adrian
52
78
45
63
76
In this case, the output file sorted.txt should look like:
Byrne, Geraldine
Cahill, Catherine
Lawlor, Adrian
Ryan, Elizabeth
Sheridan, Donal
45
78
76
63
52
The name of the input file should be provided to your program by the user, as follows (user input in bold):
Enter name of file containing student records to be sorted: raw1.txt
The Bubble Sort Algorithm
In the bubble sort algorithm, a pass through a data set consists of comparing adjacent pairs of elements and
effecting a swap if two elements are out of order (as shown in Table 1). Each such pass will ensure that at least
one element will be in its correct position. The process is repeated until the list is fully sorted.
Table 1: Bubble sort algorithm
0 0:SMITH
1 1:JONES
2 2:BYRNE
33:REILLY
Initial state of
data set
0:JONES
1:SMITH
2:BYRNE
3:REILLY
Interchange after
comparing slots
0 and 1
0:JONES
1:BYRNE
2:SMITH
3:REILLY
Interchange after
comparing slots 1
and 2
0:JONES
1:BYRNE
2:REILLY
3:SMITH
Interchange after
comparing slots
2 and 3
Deliverables
File name
bubsort.c
Description
C source code as described above
YOUR PROGRAM WILL NOT BE GRADED UNLESS IT HAS THE CORRECT FILENAME
STUDENTS MUST WORK INDEPENDENTLY. PROGRAMS WILL BE EXAMINED FOR
EVIDENCE OF COPYING. COPYING OR ALLOWING YOUR WORK TO BE COPIED WILL
RESULT IN A GRADE OF “NM” BEING ALLOCATED FOR THE ASSIGNMENT.
Cavanagh, Tom
Phill, Lewis
Schuldt, Travis
Rose, Joe
Jenkins, Ken
Flynn, Neil
Lloyd, Sam
Kastl, Johnny
Faison, Donald
Chun, Charles
Miller, Christa
Maschio, Robert
Chalke, Sarah
Wright, Aloma
McGinley, John
Reyes, Judy
Reid, Tara
Braff, Zach
Klebba, Martin
Graham, Heather
Stevenson, Geoff
40
1
17
64
35
81
61
29
6
55
76
39
30
17
42
56
51
41
40
85
29
Sheridan, Donal
Cahill, Catherine 78
Byrne, Geraldine 45
Ryan, Elizabeth
Lawlor, Adrian
52
63
76

Purchase answer to see full
attachment

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more