Question: String fileName is read from input. The oponed file, which oontains counts of beets were ocdered from a arocery atore by various ndividuais, is named
String fileName is read from input. The oponed file, which oontains counts of beets were ocdered from a arocery atore by various ndividuais, is named fileName. The flle is associated with the stream datafs: Using a locg, read pairs of a string and an integer from the openod file and output the string followed by "ardered and the integer Continue unsil the end of the file. If an error occurs during a read operation, then the loop should terminate. End each output with a newline. Ex: If the input is data2. txt, then the output is: Avi ordered 11 Ani ordered 37 Santino ordered 41 Alfredo ordered 51
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
