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, 22.06.2019 07:00
For all machines-not just hammers- the user applies force force to the machine to the machine over a certain distance. a. input b. output c. duo d. none of the above
Answers: 1
question
Computers and Technology, 23.06.2019 01:00
Complete the sentence about a presentation delivery method
Answers: 2
question
Computers and Technology, 23.06.2019 23:40
4. what is the reason for including the following code snippet in the header file animal.h? #ifndef animal_h #define animal_h class animal { public: animal(); animal(double new_area_hunt); void birth(); void hunt(double new_area_hunt); void death(); double get_area_hunt() const; private: double area_hunt; }; #endif
Answers: 3
question
Computers and Technology, 24.06.2019 10:40
Joe needs to see the slide transitions and animations he has applied to his slides in a large view. which presentation view should he use? in which tab would joe find the animations option to make further changes, if any?
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
Mathematics, 15.07.2019 05:00