Which of the following loop condition statements will read all the data in the file assuming that each record in the file is two integer values, and you will read the first one into a variable named intOne, and the other into intTwo?

a. while(inFile >> intOne >> intTwo)

b. while(inFile(intOne, intTwo))

c. while(inFile)

d. while(inFile >> intOne >> intTwo) and while(inFile(intOne, intTwo))

Respuesta :

A is probably the one

Loops are code statements that are used to perform repetitive operations.

The loop condition that performs that required operation is: (a) while (inFile >> intOne >> intTwo)

From the questions, we have the following highlights:

  • Integer variables: itOne and intTwo
  • File stream: inFile

The syntax to read the data from a file to the two integer variables is:

while (file_stream>> variable_1>> variable_2)

Hence, the required loop condition is: (a) while (inFile >> intOne >> intTwo)

Read more about loops at:

https://brainly.com/question/16397886