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

1. You get the manipulators endl and member functions setf and precision with the iostream header, but you have to include the iomanip header to get the manipulators setw and setprecision..
2. You don’t need using directives or using declarations to use the setw or setprecision manipulators.
3. C++ uses the system file name for the program file name.
4. For the binary search in the text to work, the element searched for must actually be
present in the array.


1. True
2. False
To use these iomanipulators, you must either place the include directive
#include
and this using directive prior to use of the manipulators,
using namespace std;
or place the following using declarations
using std::setw;
using std::setprecision;
in your program in a scope that includes your use of these manipulators, prior to their use.
3. False.
Some languages do this but C++ requires that you declare a file stream variable and explicitly attach it to the system file name. System file names frequently have characters in them that are illegal in C++ names. This would place too strong a restriction on file names that C++ programs can manipulate.
4. False
The routine in the text sets the bool reference variable to false if the key
is not found.

Computer Science & Information Technology

You might also like to view...

How many comparisons of array items do the following loops contain?

``` for (j = 1; j <= n-1; j++) { i = j + 1; do { if (theArray[i] < theArray[j]) swap(theArray[i], theArray[j]); i++; } while (i <= n); } ```

Computer Science & Information Technology

Which protocol is used to transmit e-mail over the Internet?

A) FTP B) SMTP C) HTTP D) VoIP

Computer Science & Information Technology

The Trace Outline command traces the outline of the stroke at its current stroke weight, then converts the stroke into a filled object with that size.

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

Computer Science & Information Technology

Answer the following queries using relational algebra:

Consider the following relational schema, where the keys are underlined:

Employee ( ssn, name, gender, address, salary, supervisorSSN, dnumber )
Department ( dnumber, dmname, managerSSN)
DeptLocation ( dnumber, dlocation)
Project (pnumber, pname, plocation)
WorksOn (emplSSN, pnumber, hours)

(a) Retrieve the names of all male employees in department number 666, who work more
than 13 hours per week on project "Catch 22".
(b) Find the names of employees who are two managerial levels below the employee "Joe
Public".
(c) Find names of the department that have no employees.
(d) Find those employees in department number 123 who do not work on any project at
location NYC.

Computer Science & Information Technology