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, 22.06.2019 11:30
What does a cascading style sheet resolve a conflict over rules for an element? a. the rule affecting the most content wins b. the rule affecting the most content loses c. the rule with the most specific selector loses d. the rule with the most specific selector wins
Answers: 2
question
Computers and Technology, 23.06.2019 18:50
Ais a picture icon that is a direct link to a file or folder
Answers: 1
question
Computers and Technology, 23.06.2019 20:00
What software programs are used to to create professional publication? a.) graphics programs b.) word processors c.) page layout programs d.) spreadsheet programs
Answers: 2
question
Computers and Technology, 23.06.2019 20:40
Instruction active describing list features which statements accurately describe the features of word that are used to create lists? check all that apply. the tab key can be used to create a sublist. the enter key can be used to add an item to a list. the numbering feature allows for the use of letters in a list. the numbering feature can change the numbers to bullets in a list. the multilevel list feature provides options for different levels in a list.
Answers: 2
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