subject

In main, you will read in an input filename and re-prompt until a valid input file is read, once the filestream could be opened, you will read the file, the file will contain the following: an integer that denotes the amount of test cases (or the amount of streets the hamburglar will hit), then for each test case, there will be an arbitrary series of numbers that denotes the amount of hamburgers in a restaurant, each test case will be terminated with -1. then for each test case, output the max number of hamburgers the hamburglar can steal from that street. the amount of restaurants on the street is unknown, thus you will need to have a pointer that will constantly resize the dynamic array, we also want to save memory so you don’t want to allocate too large of an array, so allocate an array of size 5 and everytime the array fills up, allocate 5 more elements to the array. you may need to deallocate the array after each test case is finished.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 14:30
Choose the answers that best complete each sentence. on average,are more expensive than other kinds of postsecondary schools. the cost of room and board includes. to save money, some students attend auniversity in their home state.
Answers: 2
question
Computers and Technology, 24.06.2019 08:00
Java the manager of a football stadium wants you to write a program that calculates the total ticket sales after each game
Answers: 1
question
Computers and Technology, 24.06.2019 16:30
Which program can damage your computer?
Answers: 1
question
Computers and Technology, 24.06.2019 21:00
How does a vaccine prevent sickness and individual?
Answers: 2
You know the right answer?
In main, you will read in an input filename and re-prompt until a valid input file is read, once the...
Questions
question
Mathematics, 08.09.2021 20:50
question
Mathematics, 08.09.2021 20:50
question
Geography, 08.09.2021 20:50
question
Mathematics, 08.09.2021 20:50
question
Mathematics, 08.09.2021 20:50