subject

Level 1 programming task write the function getpop(char mycode[3]), which takes in a two-digit string representing the state or territory code and returns the associated state or territory population. the function should open and scan the file uspops. txt for the input two-digit code, mycode. if mycode is not found in the file, the function should return -1. make sure to close the file once the file reading is complete. level 2 programming task write the function getrank(int mypop), which takes in an integer representing a state or territory population and returns its rank. the function should open the file uspops. txt and compare mypop to the populations for all states and territories. example: california is the most populous state with 39536653 people, so when getrank(39536653) is called, the function should return 1 (because there are 0 states with a greater population than 39536653). make sure to close the file once the file reading is complete. level 3 programming task write the function state_totalpop(state* headstate), which takes in a pointer to the head element of a linked list and returns the total population sum for all elements in the list.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 16:00
Write a grading program for a class with the following grading policies: a. there are two quizzes, each graded on the basis of 10 points. b. there is one midterm exam and one final exam, each graded on the basis of 100 points. c. the final exam counts for 50% of the grade, the midterm counts for 25%, and the two quizzes together count for a total of 25%. (do not forget to normalize the quiz scores. they should be converted to a percentage before they are averaged in.) any grade of 90 or more is an a, any grade of 80 or more (but less than 90) is a b, any grade of 70 or more (but less than 80) is a c, any grade of 60 or more (but less than 70) is a d, and any grade below 60 is an f. the program will read in the student’s scores and output the student’s record, which consists of two quiz and two exam scores as well as the student’s average numeric score for the entire course and final letter grade. define and use a structure for the student reco
Answers: 2
question
Computers and Technology, 23.06.2019 18:00
Ramona enjoys her job because she is able to kids in an after school program. the work value ramona feels strongest about is a. leadership b. risk c. independence d. work with people select the best answer from the choices provided a b c d
Answers: 1
question
Computers and Technology, 24.06.2019 14:30
Two students are discussing electricity that has a frequency of 60 hz. student a says that this type of electricity is referred to as ac. student b says that in this type of electricity, the electrons flow in only one direction. which of the following statements is correct? a. only student a is correct b. only student b is correct c. both of the two students are correct d. neither of the two students is correct
Answers: 1
question
Computers and Technology, 24.06.2019 23:00
Why is it preferable to code web pages in html format? a. to create more lines code b. to apply general formatting rules c. to display properly as search results in all browsers d. to add meaning to the document
Answers: 1
You know the right answer?
Level 1 programming task write the function getpop(char mycode[3]), which takes in a two-digit strin...
Questions
question
Arts, 05.03.2020 04:50
question
Health, 05.03.2020 04:50
Questions on the website: 13722367