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

1. In C++ Boolean value are represented only with the int values 0 for false and 1 for
true.
2. Extensive use of global variables is a satisfactory replacement for the difficulties of
parameter passing with functions.
3. A variable declared outside any function is said to be a local variable.
4. A variable declared within a function block is said to be local to the function.


1. False.
In C++ the bool type is a real type, with values true and false, but
0 is interpreted as true and 0 as false, and true and false will be converted to
1 and 0 respectively.
2. False.
Global variable use ties functions together so tightly that it is impossible
to understand any one function’s behavior apart from the whole of the program. This
complexity makes understanding a program very difficult.
3. False.
This is a global variable.
4. True
Such a variable is said to be local to the function or to have the function
as its scope, and is also known as a local variable if the scope is clear from the
context.

Computer Science & Information Technology

You might also like to view...

Mnemonics can be used with all subclasses of which class?

a. AbstractButton. b. JMenu. c. JMenuItem d. JComponent.

Computer Science & Information Technology

You can add and delete fields in either Layout view or Design view

Indicate whether the statement is true or false

Computer Science & Information Technology

When creating a table with four columns, the size of each column will:

A) depend on the font of the paragraph above. B) be 110 pts wide. C) be 1 inch wide. D) be of equal width.

Computer Science & Information Technology

You can format footers to display differently on even pages and:

a. subordinate pages b. odd pages c. uneven pages

Computer Science & Information Technology