Suppose the following code is embedded in an otherwise correct and complete program. Answer below the question about what version of f() is called in g().

```
void f(); //global
namespace A
{
void g()
{
f(); //Does this call A::f()? Or the global f()?
}
void f();

```
a) The call is to the global f();
b) The call is to the namespace A version of f(), i.e., A::f();
c) There is an error. There is a conflict between the namespace f() and the global
f(), so there is no call made at all
d) There are other errors that prevent the code from running.


a) The scope of an identifier starts at its declaration and runs until shadowed. In g(),
the global f() is in scope. A::f()is not available.
b) A use of a name refers to a global namespace version if not masked by a name
defined in the name space prior to the use. The definition of A::f() has not been
seen at the point that A::g() is invoked.
c) There is no conflict between global

Computer Science & Information Technology

You might also like to view...

_______________ returns the selected item on a ComboBox cbo.

a. cbo.getSelectedIndex() b. cbo.getSelectedItem() c. cbo.getSelectedIndices() d. cbo.getSelectedItems() e. cbo.getValue()

Computer Science & Information Technology

Which of the following statements about security awareness is not true?

A. The purpose of security awareness is to focus attention on security. B. Awareness is training. C. Security awareness programs are designed to remind users of appropriate behaviors. D. A posted reminding users not to write their password down is an example of an awareness program.

Computer Science & Information Technology

When you copy a formula Select one:

a. Excel erases the original copy of the formula b. Excel doesn't adjust relative cell references c. Excel edits cell references in the newly copied formula d. Excel adjusts absolute cell references

Computer Science & Information Technology

The _____ function returns a node-set that matches a specified value from a key index.?

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology