Consider the following code.
// Insertion Point 1
using namespace std;
const float PI = 3.14;
int main()
{
//Insertion Point 2
float r = 2.0;
float area;
area = PI * r * r;

cout << "Area = " << area < return 0;
} //
Insertion Point 3

In this code, where does the include statement belong?
a. Insertion Point 1
b. Insertion Point 2
c. Insertion Point 3
d. Anywhere in the program

Respuesta :

Answer:

a. Insertion Point 1

Explanation:

Include statement should be written at Insertion Point 1 because using namespace std will need to look into the include statement, otherwise it will prompt for an error. It cannot be written at Insertion point 3 either because the cout statement belongs to the include statement, and placing the statement after cout will cause an error and the program execution will stop.