What is wrong with the following code?
int f1( int x, int y)
{
x = y * y;
return x;
int f2( float a, float& b)
{
if(a < b)
b = a;
else
a=b;
return 0.0;
}
}
a. Neither function should return a value
b. Function definitions may not be nested
c. Both parameters to f2 should be pass-by reference
d. in f2, a can not be assigned b.
e. nothing is wrong
b. Function definitions may not be nested
You might also like to view...
A two-dimensional array can have elements of __________ data type(s).
a. one b. two c. four d. any number of e. None of these
Software can typically be obtained on disc or through the Internet
Indicate whether the statement is true or false
The white box tests of program controls are also known as auditing through the computer.
Answer the following statement true (T) or false (F)
Case Based Critical ThinkingMark's team is working on a series of children's books, which involves the creation of many complex illustrations. Mark knows that this project will be a major challenge for his team in the use of patterns. The art director of the books meets with Mark and tells him that she wants the line work on the graphics to have varying weight. For example, if a circle has a black stroke, she wants the stroke to be thin in some areas and thicker in others. Mark tells her he will create a series of brushes to achieve this effect. What type of brush will Mark create?
What will be an ideal response?