subject

In this lab you will write a C program to sort an array of strings. The program will: Create an array of 50 strings; each string can hold up to 30 characters. Write a function to read strings from the file "strings. dat" into your array. Read until EOF and keep track of how many strings you read, as it may be less than 50. Then pass this variable to your print and sort functions so they know how many strings to print and sort. Use fopen to open the file and fgets to read each string. Write a function to sort the strings. Only sort the array entries that contain strings read from the file. See below for pseudocode for selection sort. Write a function to swap two strings, which will be called by your sort function. Pass the array and the subscripts of the two strings that need to be swapped. Write a function to print out the array entries that were read into the array. Use printf. Your main function should call the functions to read into the array, print the array, sort the array, and print the array again.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 20:00
An excel which cell contains =b2 is copied to row below, the same column. what will be the new cell's content
Answers: 2
question
Computers and Technology, 21.06.2019 22:00
Which one of the following identifies the primary a purpose of information classification processes? a. define the requirements for protecting sensitive data.b. define the requirements for backing up data.c. define the requirements for storing data.d. define the requirements for transmitting data.
Answers: 2
question
Computers and Technology, 23.06.2019 18:30
Report all segments of identity by descent longer than 20 polymorphisms between pairs of individuals in the following cohort of 15 individuals across 49 polymorphisms: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 numeric input 2 points possible (graded) you have 2 attempts to complete the assignment below. for example if the sequence is "bcd", which occurs in "abcdef" , the starting point would be 2 (b), and the finishing point would be 4(d). individuals 7,10 between positions
Answers: 1
question
Computers and Technology, 24.06.2019 09:00
Technician a says that a new replacement part is always good. technician b says that sometimes recent repair work will be the cause of a complaint. who is correct? a. both technicians a and b b. technician a c. technician b d. neither technician a nor b
Answers: 3
You know the right answer?
In this lab you will write a C program to sort an array of strings. The program will: Create an arra...
Questions
Questions on the website: 13722361