Consider the iostream library, in particular, cout and endl. Assume that the #include has been executed. At this point, there are three ways to specify cout and endl so the compiler will be able to find these names when you output say “Hello World”. Give all three methods.
What will be an ideal response?
a) Place a using directive in you code, either globally or in the block where you will
use it. Example:```
using namespace std;
cout << “Hello World” << endl;
```
b) Place a using definition, in you code, either globally or in the block where you will```
using std::cout; using std:endl;
cout << “Hello World” <
{/code
c) Qualify each name you will use with the namespace name and the scope resolution operator.
```
std::cout << “Hello World” << std::endl;
```
Computer Science & Information Technology