Which of the following code segments does not contain any errors?
a)
void printnum (int x)
{
print("%i", x);
return x;
}
b)
int cube(int s)
{
int s;
return (s * s * s);
}
c)
double triple(float n) {
return (3 * n);
}
(d)
double circumference (int r)
return (3.14 * 2 * r);
c)
double triple(float n) {
return (3 * n);
}
Computer Science & Information Technology
You might also like to view...
Requirements for an Access project should answer all of the questions EXCEPT:
A) What details are required to support the problem and solution? B) What business decisions need to be made? C) What is the business question? D) How much money is needed for the project?
Computer Science & Information Technology
Which is an example of a file format that is not automatically compressed?
A. GIF B. RAW C. JPEG D. MPEG4
Computer Science & Information Technology