Here is a complete function that purports to return one of the roots of a quadratic given suitable parameters. It looks good, but fails to compile. Why?

```
//returns one of the roots of the quadratic equation
//a*x*x + b*x + c = 0 a!= 0
double root1 (double a, double b, double c)
{
return (-b + sqrt(b*b-4*a*c))/(2*a);
```


The function sqrt, called in the body of the function root1, has no declaration
(or prototype) given. The rest of the code is correct. The following preprocessor
directive is needed prior to the definition of the function root to get a declaration of
sqrt.
#include
Some systems will create a declaration of an un-type-checked function, to allow
the compiler to find other errors. The user is warned, but linking usually fails in
this event.

Computer Science & Information Technology

You might also like to view...

Search the web for “Image Processing Libraries in C++.”. Find three products that provide C++ classes for your programs. List three file formats that each library supports. Indicate if they are Open Source or available for a fee.

What will be an ideal response?

Computer Science & Information Technology

Suppose that a client uses a struct object for the DataType of a class template, and this will require that operators (used within the class functions) are overloaded. The best way to tell a client which operators will need to have overloaded operator functions, and how the functions should be written, is to:

A. send the client a detailed email about all required overloaded operator functions B. place comments above the class template that specify the details of the required overloaded operator functions C. write details about the required overloaded operator functions into the client’s main program D. You shouldn’t tell the client how to do it – you should write the overloaded operator functions yourself, and place them in another file

Computer Science & Information Technology

The error message #NULL! indicates the use of a name that Excel does not recognize.

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

Computer Science & Information Technology

In the following pseudocode, if any of three conditions evaluates as true, the combined condition is also true.If code == "SF" Or code == "SP" Or code == "SB" Then   Display "Your order has been shipped."End If

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

Computer Science & Information Technology