You want to use only one name, funct1, from name space MyNamespace. The directive #include “MyNamespace” has been places at the top of the file. You will call this function a large number of times in a block. Which of the following will make only the name funct1 available only in that block (not outside the block)?

a. Place
using namespace std;
just after your #include directives.
b. Place
using namespace MyNamespace;
just after your other #include directives.
c. Place
using namespace MyNamespace;
just inside the block where you want to use funct1.
d. Place
using MyNamespace::func1;
just inside the block where you want to use funct1.
e. Place #include “MyNamespace” at the top of the file where you are using the name func1.


d)
Explanation: Part a) does not make the function available as the question asks, rather it makes all the names from namespace std available in the file. Part b) makes the name funct1 available everywhere in the file. Part c) makes all the names in namespace MyNamespace available in the block. Only part d) makes only the name funct1 available only in the block were it is to be used.
Free Form Questions:

Computer Science & Information Technology

You might also like to view...

Just like the Paintbrush tool, a Bristle brush creates stroked paths.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

A hyperlink is a web site address that is contained within a word of the text

Indicate whether the statement is true or false

Computer Science & Information Technology

Filters are applied from the Filters section of the Property ____.

A. organizer B. inspector C. manager D. agent

Computer Science & Information Technology

The HTML5 _____________ form control provides the user with a selection of choices along with an option to enter information

a. select list b. check box c. datalist d. slider

Computer Science & Information Technology